From: jane.chu@oracle.com
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Dan Williams <dan.j.williams@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/2] dax: Remove access to page->index
Date: Mon, 16 Dec 2024 09:49:44 -0800 [thread overview]
Message-ID: <f6a49469-cd5d-4aff-bc41-392db55a5828@oracle.com> (raw)
In-Reply-To: <20241216155408.8102-1-willy@infradead.org>
On 12/16/2024 7:53 AM, Matthew Wilcox (Oracle) wrote:
> This looks like a complete mess (why are we setting page->index at page
> fault time?), but I no longer care about DAX, and there's no reason to
> let DAX hold us back from removing page->index.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
> drivers/dax/device.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dax/device.c b/drivers/dax/device.c
> index 6d74e62bbee0..bc871a34b9cd 100644
> --- a/drivers/dax/device.c
> +++ b/drivers/dax/device.c
> @@ -89,14 +89,13 @@ static void dax_set_mapping(struct vm_fault *vmf, pfn_t pfn,
> ALIGN_DOWN(vmf->address, fault_size));
>
> for (i = 0; i < nr_pages; i++) {
> - struct page *page = pfn_to_page(pfn_t_to_pfn(pfn) + i);
> + struct folio *folio = pfn_folio(pfn_t_to_pfn(pfn) + i);
>
> - page = compound_head(page);
> - if (page->mapping)
> + if (folio->mapping)
> continue;
>
> - page->mapping = filp->f_mapping;
> - page->index = pgoff + i;
> + folio->mapping = filp->f_mapping;
> + folio->index = pgoff + i;
> }
> }
>
Looks good.
Reviewed-by: Jane Chu <jane.chu@oracle.com>
-jane
next prev parent reply other threads:[~2024-12-16 17:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 15:53 Matthew Wilcox (Oracle)
2024-12-16 15:53 ` [PATCH 2/2] dax: Use folios more widely within DAX Matthew Wilcox (Oracle)
2024-12-16 17:49 ` jane.chu
2024-12-16 22:25 ` Alistair Popple
2024-12-16 17:49 ` jane.chu [this message]
2025-01-07 0:43 ` [PATCH 1/2] dax: Remove access to page->index Dan Williams
2025-01-07 23:24 ` Alistair Popple
2025-02-14 16:16 ` Matthew Wilcox
2025-02-14 23:37 ` Andrew Morton
2025-02-14 21:44 ` Dan Williams
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=f6a49469-cd5d-4aff-bc41-392db55a5828@oracle.com \
--to=jane.chu@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
--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