All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Tal Zussman <tz2294@columbia.edu>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	 Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	 David Hildenbrand <david@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Zi Yan <ziy@nvidia.com>,
	 Matthew Brost <matthew.brost@intel.com>,
	Joshua Hahn <joshua.hahnjy@gmail.com>,
	 Byungchul Park <byungchul@sk.com>,
	Gregory Price <gourry@gourry.net>,
	 Ying Huang <ying.huang@linux.alibaba.com>,
	Alistair Popple <apopple@nvidia.com>,
	 Jason Gunthorpe <jgg@ziepe.ca>,
	John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
	 Hugh Dickins <hughd@google.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	 linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/8] mm: remove read_cache_page_gfp()
Date: Tue, 3 Nov 2026 08:37:19 +0000	[thread overview]
Message-ID: <aumdHgUtiQzkNzs6@gremlin> (raw)
In-Reply-To: <20261102-page-wrappers-v1-7-e7280bdb31f6@columbia.edu>

On Mon, Nov 02, 2026 at 05:54:12PM -0500, Tal Zussman wrote:
> There are no callers left. Point the comment on shmem_read_folio_gfp()
> at mapping_read_folio_gfp() instead.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>

LGTM!

Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>

> ---
>  include/linux/pagemap.h |  2 --
>  mm/filemap.c            | 23 -----------------------
>  mm/shmem.c              |  4 ++--
>  3 files changed, 2 insertions(+), 27 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index a92329805acd..305c99bad689 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -962,8 +962,6 @@ struct folio *mapping_read_folio_gfp(struct address_space *, pgoff_t index,
>  		gfp_t flags);
>  struct page *read_cache_page(struct address_space *, pgoff_t index,
>  		filler_t *filler, struct file *file);
> -extern struct page * read_cache_page_gfp(struct address_space *mapping,
> -				pgoff_t index, gfp_t gfp_mask);
>
>  static inline struct page *read_mapping_page(struct address_space *mapping,
>  				pgoff_t index, struct file *file)
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 1df776907140..2b724d9be94b 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -4258,29 +4258,6 @@ struct page *read_cache_page(struct address_space *mapping,
>  }
>  EXPORT_SYMBOL(read_cache_page);
>
> -/**
> - * read_cache_page_gfp - read into page cache, using specified page allocation flags.
> - * @mapping:	the page's address_space
> - * @index:	the page index
> - * @gfp:	the page allocator flags to use if allocating
> - *
> - * This is the same as "read_mapping_page(mapping, index, NULL)", but with
> - * any new page allocations done using the specified allocation flags.
> - *
> - * If the page does not get brought uptodate, return -EIO.
> - *
> - * The function expects mapping->invalidate_lock to be already held.
> - *
> - * Return: up to date page on success, ERR_PTR() on failure.
> - */
> -struct page *read_cache_page_gfp(struct address_space *mapping,
> -				pgoff_t index,
> -				gfp_t gfp)

Also eliminates this very weird line-wrapping... :)

> -{
> -	return do_read_cache_page(mapping, index, NULL, NULL, gfp);
> -}
> -EXPORT_SYMBOL(read_cache_page_gfp);
> -
>  /*
>   * Warn about a page cache invalidation failure during a direct I/O write.
>   */
> diff --git a/mm/shmem.c b/mm/shmem.c
> index de838dbb4df8..16b1cc3d8ac5 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -6190,9 +6190,9 @@ int shmem_zero_setup_desc(struct vm_area_desc *desc)
>   * @index:	the folio index
>   * @gfp:	the page allocator flags to use if allocating
>   *
> - * This behaves as a tmpfs "read_cache_page_gfp(mapping, index, gfp)",
> + * This behaves as a tmpfs "mapping_read_folio_gfp(mapping, index, gfp)",
>   * with any new page allocations done using the specified allocation flags.
> - * But read_cache_page_gfp() uses the ->read_folio() method: which does not
> + * But mapping_read_folio_gfp() uses the ->read_folio() method: which does not
>   * suit tmpfs, since it may have pages in swapcache, and needs to find those
>   * for itself; although drivers/gpu/drm i915 and ttm rely upon this support.
>   *
>
> --
> 2.39.5
>

--
Cheers, Lorenzo


  parent reply	other threads:[~2026-11-03  8:37 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 22:54 [PATCH 0/8] mm: remove newly-unused page wrapper APIs Tal Zussman
2026-11-02 22:54 ` [PATCH 1/8] mm: remove wait_on_page_writeback() Tal Zussman
2026-11-03  1:34   ` SJ Park
2026-11-03  3:42   ` Zi Yan
2026-11-03  8:32   ` Lorenzo Stoakes (ARM)
2026-11-02 22:54 ` [PATCH 2/8] mm: remove end_page_writeback() Tal Zussman
2026-11-03  1:36   ` SJ Park
2026-11-03  3:43   ` Zi Yan
2026-11-03  8:33   ` Lorenzo Stoakes (ARM)
2026-11-02 22:54 ` [PATCH 3/8] mm: remove clear_page_dirty_for_io() Tal Zussman
2026-11-03  1:39   ` SJ Park
2026-11-03  3:44   ` Zi Yan
2026-11-03  8:34   ` Lorenzo Stoakes (ARM)
2026-11-02 22:54 ` [PATCH 4/8] mm: remove attach_page_private() and detach_page_private() Tal Zussman
2026-11-03  1:40   ` SJ Park
2026-11-03  3:44   ` Zi Yan
2026-11-03  8:34   ` Lorenzo Stoakes (ARM)
2026-11-02 22:54 ` [PATCH 5/8] mm: remove find_get_page_flags() Tal Zussman
2026-11-03  1:41   ` SJ Park
2026-11-03  3:45   ` Zi Yan
2026-11-03  8:35   ` Lorenzo Stoakes (ARM)
2026-11-02 22:54 ` [PATCH 6/8] mm: remove find_lock_page() Tal Zussman
2026-11-03  1:43   ` SJ Park
2026-11-03  3:46   ` Zi Yan
2026-11-03  8:36   ` Lorenzo Stoakes (ARM)
2026-11-02 22:54 ` [PATCH 7/8] mm: remove read_cache_page_gfp() Tal Zussman
2026-11-03  1:45   ` SJ Park
2026-11-03  3:46   ` Zi Yan
2026-11-03  8:37   ` Lorenzo Stoakes (ARM) [this message]
2026-11-02 22:54 ` [PATCH 8/8] mm: remove thp_size() and thp_order() Tal Zussman
2026-11-03  1:48   ` SJ Park
2026-11-03  3:47   ` Zi Yan
2026-11-03  8:42   ` Lorenzo Stoakes (ARM)
2026-11-03  1:56 ` [PATCH 0/8] mm: remove newly-unused page wrapper APIs Andrew Morton
2026-11-03  8:45   ` David Hildenbrand (Arm)
2026-11-03  9:02   ` Christoph Hellwig
2026-11-03  9:29     ` Vishal Moola (Fractile)
2026-11-03  9:14 ` Vishal Moola (Fractile)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aumdHgUtiQzkNzs6@gremlin \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=byungchul@sk.com \
    --cc=david@kernel.org \
    --cc=gourry@gourry.net \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=joshua.hahnjy@gmail.com \
    --cc=liam@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew.brost@intel.com \
    --cc=mhocko@suse.com \
    --cc=peterx@redhat.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=tz2294@columbia.edu \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    --cc=ying.huang@linux.alibaba.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.