f2fs: merge the two conditions to avoid code duplication
PATCH 1/1 f2fs: merge the two conditions to avoid code duplication
No functional changes.
Signed-off-by mason.zhang <[email protected]>
--- fs/f2fs/gc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
fs/f2fs/gc.c +1 -6
@@ -278,12 +278,7 @@ static void select_policy(struct f2fs_sb_info *sbi, int gc_type, {struct dirty_seglist_info *dirty_i =DIRTY_I (sbi); -if (p->alloc_mode ==SSR ) { - p->gc_mode =GC_GREEDY ; - p->dirty_bitmap = dirty_i->dirty_segmap[type]; - p->max_search = dirty_i->nr_dirty[type]; - p->ofs_unit =1 ; - }else if (p->alloc_mode ==AT_SSR ) { +if (p->alloc_mode ==SSR || p->alloc_mode ==AT_SSR ) { p->gc_mode =GC_GREEDY ; p->dirty_bitmap = dirty_i->dirty_segmap[type]; p->max_search = dirty_i->nr_dirty[type];
Signature · 1 line
2.50.0
Quoted 3 lines · mason.zhang
No functional changes.
Signed-off-by mason.zhang <[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 6 lines · On Wed, 23 Jul 2025 22:58:37 +0800 you wrote:
No functional changes.
Signed-off-by mason.zhang <[email protected]>--- fs/f2fs/gc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
Here is the summary with links:
- [f2fs-dev] f2fs: merge the two conditions to avoid code duplication
https://git.kernel.org/jaegeuk/f2fs/c/b93bf64e349b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html