From: David Hildenbrand <david@redhat.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] secretmem: Remove uses of struct page
Date: Mon, 16 Jun 2025 23:19:54 +0200 [thread overview]
Message-ID: <430a76d9-5885-488c-9ab9-c0e40fce95c2@redhat.com> (raw)
In-Reply-To: <20250613194744.3175157-1-willy@infradead.org>
On 13.06.25 21:47, Matthew Wilcox (Oracle) wrote:
> Use filemap_lock_folio() instead of find_lock_page() to retrieve
> a folio from the page cache.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
[...]
>
> - addr = (unsigned long)page_address(page);
> + addr = (unsigned long)folio_address(folio);
> flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
> }
>
> - vmf->page = page;
> + vmf->page = folio_file_page(folio, vmf->pgoff);
We only support small folios -- see the folio_alloc(gfp | __GFP_ZERO, 0)
-- so you can just use folio here.
With the fixup from Lorenzo
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2025-06-16 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 19:47 [PATCH] secretmem: Remove uses of struct page Matthew Wilcox (Oracle)
2025-06-15 7:10 ` Mike Rapoport
2025-06-16 13:56 ` Lorenzo Stoakes
2025-06-16 21:19 ` David Hildenbrand [this message]
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=430a76d9-5885-488c-9ab9-c0e40fce95c2@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=rppt@kernel.org \
--cc=willy@infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).