linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dax: Remove access to page->index
@ 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)
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Matthew Wilcox (Oracle) @ 2024-12-16 15:53 UTC (permalink / raw)
  To: Dan Williams
  Cc: Matthew Wilcox (Oracle), Vishal Verma, Dave Jiang, nvdimm,
	linux-cxl, linux-fsdevel, linux-mm

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;
 	}
 }
 
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-02-14 23:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 15:53 [PATCH 1/2] dax: Remove access to page->index 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 ` [PATCH 1/2] dax: Remove access to page->index jane.chu
2025-01-07  0:43 ` 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

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).