Skip to content

Commit 1cf7460

Browse files
Matthew Wilcox (Oracle)Jaegeuk Kim
authored andcommitted
f2fs: Add F2FS_F_SB()
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) <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 87e2a15 commit 1cf7460

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fs/f2fs/f2fs.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,9 +2003,14 @@ static inline struct f2fs_sb_info *F2FS_M_SB(struct address_space *mapping)
20032003
return F2FS_I_SB(mapping->host);
20042004
}
20052005

2006+
static inline struct f2fs_sb_info *F2FS_F_SB(struct folio *folio)
2007+
{
2008+
return F2FS_M_SB(folio->mapping);
2009+
}
2010+
20062011
static inline struct f2fs_sb_info *F2FS_P_SB(struct page *page)
20072012
{
2008-
return F2FS_M_SB(page_file_mapping(page));
2013+
return F2FS_F_SB(page_folio(page));
20092014
}
20102015

20112016
static inline struct f2fs_super_block *F2FS_RAW_SUPER(struct f2fs_sb_info *sbi)

0 commit comments

Comments
 (0)