diff options
| author | Pedro Demarchi Gomes <pedrodemargomes@gmail.com> | 2025-10-04 00:12:17 -0300 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-10-24 21:23:55 +0000 |
| commit | e4384545e22024d39edc13c63433f37e31960671 (patch) | |
| tree | e95ce2187f90f7bc738751e0510a71926755e2dd | |
| parent | 81464df36094340395cadc9235e24eb4defa8c43 (diff) | |
f2fs: use folio_nr_pages() instead of shift operation
folio_nr_pages() is a faster helper function to get the number of pages when
NR_PAGES_IN_LARGE_FOLIO is enabled.
Signed-off-by: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/f2fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 5b4e9548a231..b6e35fdd5fd3 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2096,7 +2096,7 @@ static inline struct f2fs_super_block *F2FS_RAW_SUPER(struct f2fs_sb_info *sbi) static inline struct f2fs_super_block *F2FS_SUPER_BLOCK(struct folio *folio, pgoff_t index) { - pgoff_t idx_in_folio = index % (1 << folio_order(folio)); + pgoff_t idx_in_folio = index % folio_nr_pages(folio); return (struct f2fs_super_block *) (page_address(folio_page(folio, idx_in_folio)) + |
