summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2018-11-26 13:31:41 +0530
committerJaegeuk Kim <jaegeuk@kernel.org>2019-01-02 16:17:21 -0800
commit89ff71065347405357632fc56bc47453c883d01c (patch)
treed415799d54c8387ac14dbbe41911194f383092bc
parent90a67fc7b5eabdf142f30dbd6b31d0473c048031 (diff)
f2fs: fix to allow node segment for GC by ioctl path
Allow node type segments also to be GC'd via f2fs ioctl F2FS_IOC_GARBAGE_COLLECT_RANGE. Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/gc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index d6e4ceef964b..6af8c3fbfc14 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;