diff mbox series

[f2fs-dev,038/153] f2fs: Pass an address to scan_nat_page()

Message ID 20250331201256.1057782-39-willy@infradead.org (mailing list archive)
State New
Headers show
Series f2fs folio conversions for 6.16 | expand

Commit Message

Matthew Wilcox (Oracle) March 31, 2025, 8:10 p.m. UTC
Remove a conversion from folio to page by passing in the address of the
first byte rather than the struct page containing it.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/f2fs/node.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index ffe71868f459..34dc61a131bf 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2423,10 +2423,9 @@  static void remove_free_nid(struct f2fs_sb_info *sbi, nid_t nid)
 }
 
 static int scan_nat_page(struct f2fs_sb_info *sbi,
-			struct page *nat_page, nid_t start_nid)
+			struct f2fs_nat_block *nat_blk, nid_t start_nid)
 {
 	struct f2fs_nm_info *nm_i = NM_I(sbi);
-	struct f2fs_nat_block *nat_blk = page_address(nat_page);
 	block_t blk_addr;
 	unsigned int nat_ofs = NAT_BLOCK_OFFSET(start_nid);
 	int i;
@@ -2551,7 +2550,8 @@  static int __f2fs_build_free_nids(struct f2fs_sb_info *sbi,
 			if (IS_ERR(folio)) {
 				ret = PTR_ERR(folio);
 			} else {
-				ret = scan_nat_page(sbi, &folio->page, nid);
+				ret = scan_nat_page(sbi, folio_address(folio),
+						nid);
 				f2fs_folio_put(folio, true);
 			}