diff options
| author | mason.zhang <masonzhang.linuxer@gmail.com> | 2025-07-23 22:58:37 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-07-24 20:16:01 +0000 |
| commit | b93bf64e349b1952170f47a0e68fc52f666b9e25 (patch) | |
| tree | 90a635a80b4557e32b48306a88dfc82362e86681 | |
| parent | f2fs: vm_unmap_ram() may be called from an invalid context (diff) | |
| download | linux-b93bf64e349b1952170f47a0e68fc52f666b9e25.tar.gz linux-b93bf64e349b1952170f47a0e68fc52f666b9e25.zip | |
f2fs: merge the two conditions to avoid code duplication
No functional changes.
Signed-off-by: mason.zhang <masonzhang.linuxer@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/gc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 271c7f90741b..1a47a7645790 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -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]; |
