diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 8606ebf509cb..9a60801ab1c5 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -323,8 +323,7 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi, p.min_cost = get_max_cost(sbi, &p); if (*result != NULL_SEGNO) { - if (IS_DATASEG(get_seg_entry(sbi, *result)->type) && - get_valid_blocks(sbi, *result, false) && + if (get_valid_blocks(sbi, *result, false) && !sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result))) p.min_segno = *result; goto out;