]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
f2fs: Add F2FS_F_SB()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 28 Nov 2024 04:58:21 +0000 (04:58 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 16 Dec 2024 16:12:10 +0000 (16:12 +0000)
This is the folio equivalent of F2FS_P_SB().  Removes a call to
page_file_mapping() as we know folios seen by f2fs are never part of
the swap cache.

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/f2fs.h

index 6f2cbf4c57402bd40497ad5c1cefd8ecff35d678..f523dd302bf6dff548f187f55ef6364ec92f360b 100644 (file)
@@ -2003,9 +2003,14 @@ static inline struct f2fs_sb_info *F2FS_M_SB(struct address_space *mapping)
        return F2FS_I_SB(mapping->host);
 }
 
+static inline struct f2fs_sb_info *F2FS_F_SB(struct folio *folio)
+{
+       return F2FS_M_SB(folio->mapping);
+}
+
 static inline struct f2fs_sb_info *F2FS_P_SB(struct page *page)
 {
-       return F2FS_M_SB(page_file_mapping(page));
+       return F2FS_F_SB(page_folio(page));
 }
 
 static inline struct f2fs_super_block *F2FS_RAW_SUPER(struct f2fs_sb_info *sbi)