f2fs: Pass a folio to sanity_check_extent_cache()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 8 Jul 2025 17:03:02 +0000 (18:03 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 22 Jul 2025 15:55:31 +0000 (15:55 +0000)
The only caller has 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/extent_cache.c
fs/f2fs/f2fs.h
fs/f2fs/inode.c

index 4ce19a310f38a5a9ec2a102588328b9172fe739f..5be503a875dce20c8ac971a738b1cf3984b13c9f 100644 (file)
 #include "node.h"
 #include <trace/events/f2fs.h>
 
-bool sanity_check_extent_cache(struct inode *inode, struct page *ipage)
+bool sanity_check_extent_cache(struct inode *inode, struct folio *ifolio)
 {
        struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
-       struct f2fs_extent *i_ext = &F2FS_INODE(ipage)->i_ext;
+       struct f2fs_extent *i_ext = &F2FS_INODE(&ifolio->page)->i_ext;
        struct extent_info ei;
        int devi;
 
index e51ba3585d3cb9dbee280cd9fca22214e3e9065b..e075c1b19864a5cac33713f8764ade8d96401973 100644 (file)
@@ -4350,7 +4350,7 @@ void f2fs_leave_shrinker(struct f2fs_sb_info *sbi);
 /*
  * extent_cache.c
  */
-bool sanity_check_extent_cache(struct inode *inode, struct page *ipage);
+bool sanity_check_extent_cache(struct inode *inode, struct folio *ifolio);
 void f2fs_init_extent_tree(struct inode *inode);
 void f2fs_drop_extent_tree(struct inode *inode);
 void f2fs_destroy_extent_node(struct inode *inode);
index fc774de1c75264e610a4eb7cb236def78cd0331c..79f130496387c4736221ae34f0e28264629d5ca5 100644 (file)
@@ -531,7 +531,7 @@ static int do_read_inode(struct inode *inode)
 
        init_idisk_time(inode);
 
-       if (!sanity_check_extent_cache(inode, &node_folio->page)) {
+       if (!sanity_check_extent_cache(inode, node_folio)) {
                f2fs_folio_put(node_folio, true);
                f2fs_handle_error(sbi, ERROR_CORRUPTED_INODE);
                return -EFSCORRUPTED;