Skip to content

Commit b93bf64

Browse files
masonzhang-lJaegeuk Kim
authored andcommitted
f2fs: merge the two conditions to avoid code duplication
No functional changes. Signed-off-by: mason.zhang <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 08a7efc commit b93bf64

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

fs/f2fs/gc.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,7 @@ static void select_policy(struct f2fs_sb_info *sbi, int gc_type,
278278
{
279279
struct dirty_seglist_info *dirty_i = DIRTY_I(sbi);
280280

281-
if (p->alloc_mode == SSR) {
282-
p->gc_mode = GC_GREEDY;
283-
p->dirty_bitmap = dirty_i->dirty_segmap[type];
284-
p->max_search = dirty_i->nr_dirty[type];
285-
p->ofs_unit = 1;
286-
} else if (p->alloc_mode == AT_SSR) {
281+
if (p->alloc_mode == SSR || p->alloc_mode == AT_SSR) {
287282
p->gc_mode = GC_GREEDY;
288283
p->dirty_bitmap = dirty_i->dirty_segmap[type];
289284
p->max_search = dirty_i->nr_dirty[type];

0 commit comments

Comments
 (0)