From patchwork Tue Mar 22 21:39:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12789059 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36EEBC433F5 for ; Tue, 22 Mar 2022 21:39:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B81446B008A; Tue, 22 Mar 2022 17:39:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B30776B008C; Tue, 22 Mar 2022 17:39:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F7BA6B0092; Tue, 22 Mar 2022 17:39:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id 8F6236B008A for ; Tue, 22 Mar 2022 17:39:31 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 46DE68249980 for ; Tue, 22 Mar 2022 21:39:31 +0000 (UTC) X-FDA: 79273338942.31.198C594 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf24.hostedemail.com (Postfix) with ESMTP id A0A54180038 for ; Tue, 22 Mar 2022 21:39:30 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 064A06173C; Tue, 22 Mar 2022 21:39:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BDA6C340EC; Tue, 22 Mar 2022 21:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985169; bh=Id/frEGWAdaMUtqBKCeCRkwo7IwmnmPnzqwExFWQhBI=; h=Date:To:From:In-Reply-To:Subject:From; b=fY0uLUfZzss1suVmucxqiXxQoQ4/4748btUggZ8WKxtA9ZeHzzsgvcpTXLqHEVEWQ ofnUmdpTRNwdNd7dRSe3QbprcKGf1XeXoPGZOGza5lhG5cGlTQvAij2XZBGcwFTchX 54I+Vsu9ybNZY5Bognr2eTeGsSe07daFQPFMQ+Ws= Date: Tue, 22 Mar 2022 14:39:28 -0700 To: willy@infradead.org,william.kucharski@oracle.com,vbabka@suse.cz,kirill.shutemov@linux.intel.com,hch@lst.de,hannes@cmpxchg.org,dhowells@redhat.com,agruenba@redhat.com,linmiaohe@huawei.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> Subject: [patch 019/227] filemap: remove find_get_pages() Message-Id: <20220322213929.5BDA6C340EC@smtp.kernel.org> X-Stat-Signature: i84w4gmc9jmd9tazd4usued3zuxyfw7r Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=fY0uLUfZ; spf=pass (imf24.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A0A54180038 X-HE-Tag: 1647985170-136421 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Miaohe Lin Subject: filemap: remove find_get_pages() It's unused now. Remove it and clean up the relevant comment. Link: https://lkml.kernel.org/r/20220208134149.47299-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: David Howells Cc: William Kucharski Cc: Vlastimil Babka Cc: Kirill A. Shutemov Cc: Johannes Weiner Cc: Andreas Gruenbacher Signed-off-by: Andrew Morton --- include/linux/pagemap.h | 7 ------- mm/filemap.c | 11 ++++++----- 2 files changed, 6 insertions(+), 12 deletions(-) --- a/include/linux/pagemap.h~filemap-remove-find_get_pages +++ a/include/linux/pagemap.h @@ -594,13 +594,6 @@ static inline struct page *find_subpage( unsigned find_get_pages_range(struct address_space *mapping, pgoff_t *start, pgoff_t end, unsigned int nr_pages, struct page **pages); -static inline unsigned find_get_pages(struct address_space *mapping, - pgoff_t *start, unsigned int nr_pages, - struct page **pages) -{ - return find_get_pages_range(mapping, start, (pgoff_t)-1, nr_pages, - pages); -} unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, unsigned int nr_pages, struct page **pages); unsigned find_get_pages_range_tag(struct address_space *mapping, pgoff_t *index, --- a/mm/filemap.c~filemap-remove-find_get_pages +++ a/mm/filemap.c @@ -2229,8 +2229,9 @@ out: * @nr_pages: The maximum number of pages * @pages: Where the resulting pages are placed * - * find_get_pages_contig() works exactly like find_get_pages(), except - * that the returned number of pages are guaranteed to be contiguous. + * find_get_pages_contig() works exactly like find_get_pages_range(), + * except that the returned number of pages are guaranteed to be + * contiguous. * * Return: the number of pages which were found. */ @@ -2290,9 +2291,9 @@ EXPORT_SYMBOL(find_get_pages_contig); * @nr_pages: the maximum number of pages * @pages: where the resulting pages are placed * - * Like find_get_pages(), except we only return head pages which are tagged - * with @tag. @index is updated to the index immediately after the last - * page we return, ready for the next iteration. + * Like find_get_pages_range(), except we only return head pages which are + * tagged with @tag. @index is updated to the index immediately after the + * last page we return, ready for the next iteration. * * Return: the number of pages which were found. */