f2fs: use folio_nr_pages() instead of shift operation
PATCH 1/1 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 <[email protected]>
--- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/f2fs.h +1 -1
@@ -2036,7 +2036,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)) +
Signature · 1 line
2.39.5
Quoted 4 lines · Pedro Demarchi Gomes
folio_nr_pages()is a faster helper function to get the number of pages whenNR_PAGES_IN_LARGE_FOLIOis enabled.Signed-off-by Pedro Demarchi Gomes <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:
Quoted 7 lines · On Sat, 4 Oct 2025 00:12:17 -0300 you wrote:
folio_nr_pages()is a faster helper function to get the number of pages whenNR_PAGES_IN_LARGE_FOLIOis enabled.Signed-off-by Pedro Demarchi Gomes <[email protected]>--- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [f2fs-dev] f2fs: use folio_nr_pages() instead of shift operation
https://git.kernel.org/jaegeuk/f2fs/c/c9cd50d5aaf8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html