f2fs: Pass a folio to is_dent_dnode()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 8 Jul 2025 17:03:25 +0000 (18:03 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 22 Jul 2025 15:56:36 +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.h
fs/f2fs/recovery.c

index b8ec837f423c053fbb004547426a45a9f9916b0f..b54c2d520d1e12c81c7107fcfe50267c075f19dd 100644 (file)
@@ -405,7 +405,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(folio)  is_node(&folio->page, FSYNC_BIT_SHIFT)
-#define is_dent_dnode(page)    is_node(page, DENT_BIT_SHIFT)
+#define is_dent_dnode(folio)   is_node(&folio->page, DENT_BIT_SHIFT)
 
 static inline void set_cold_node(const struct folio *folio, bool is_dir)
 {
index ac8906bdcf07cf4cf4fec565853a394f278c6b73..da4b733aeaf2c93d1531bff0cda399d57703ad5d 100644 (file)
@@ -438,7 +438,7 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head,
 
                        if (!check_only &&
                                        IS_INODE(&folio->page) &&
-                                       is_dent_dnode(&folio->page)) {
+                                       is_dent_dnode(folio)) {
                                err = f2fs_recover_inode_page(sbi, folio);
                                if (err) {
                                        f2fs_folio_put(folio, true);
@@ -463,7 +463,7 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head,
                }
                entry->blkaddr = blkaddr;
 
-               if (IS_INODE(&folio->page) && is_dent_dnode(&folio->page))
+               if (IS_INODE(&folio->page) && is_dent_dnode(folio))
                        entry->last_dentry = blkaddr;
 next:
                /* check next segment */