f2fs: Pass a folio to is_fsync_dnode()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 8 Jul 2025 17:03:24 +0000 (18:03 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 22 Jul 2025 15:56:33 +0000 (15:56 +0000)
Both callers have a folio so pass it in.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c
fs/f2fs/node.h
fs/f2fs/recovery.c

index 9c4052282c8ca09eb19938ae43cc64ca7d4e39ec..cc4bf8525cb5158470069b95b9959bf6708bcd85 100644 (file)
@@ -1744,7 +1744,7 @@ static bool __write_node_folio(struct folio *folio, bool atomic, bool *submitted
 
        fio.old_blkaddr = ni.blk_addr;
        f2fs_do_write_node_page(nid, &fio);
-       set_node_addr(sbi, &ni, fio.new_blkaddr, is_fsync_dnode(&folio->page));
+       set_node_addr(sbi, &ni, fio.new_blkaddr, is_fsync_dnode(folio));
        dec_page_count(sbi, F2FS_DIRTY_NODES);
        f2fs_up_read(&sbi->node_write);
 
index 78a9a411fe77ffc1b44b42a18fb397c61594c6ec..b8ec837f423c053fbb004547426a45a9f9916b0f 100644 (file)
@@ -404,7 +404,7 @@ static inline int is_node(const struct page *page, int type)
 }
 
 #define is_cold_node(page)     is_node(page, COLD_BIT_SHIFT)
-#define is_fsync_dnode(page)   is_node(page, FSYNC_BIT_SHIFT)
+#define is_fsync_dnode(folio)  is_node(&folio->page, FSYNC_BIT_SHIFT)
 #define is_dent_dnode(page)    is_node(page, DENT_BIT_SHIFT)
 
 static inline void set_cold_node(const struct folio *folio, bool is_dir)
index 7d63a74e9ca66cffa906c71384a6fbfb12c4fee3..ac8906bdcf07cf4cf4fec565853a394f278c6b73 100644 (file)
@@ -429,7 +429,7 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head,
                        break;
                }
 
-               if (!is_fsync_dnode(&folio->page))
+               if (!is_fsync_dnode(folio))
                        goto next;
 
                entry = get_fsync_inode(head, ino_of_node(folio));