summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2018-11-26 11:01:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-13 10:51:51 +0300
commitc8aa27cf7e946da7d6c065dab3dbb7c5325f4b2c (patch)
tree614d23b3c31bfe0512849aa4bfd7f5b4f4cb546a /fs
parent2a34b42f08006c630a73610672703fe3969968d8 (diff)
downloadlinux-c8aa27cf7e946da7d6c065dab3dbb7c5325f4b2c.tar.xz
f2fs: fix to allow node segment for GC by ioctl path
[ Upstream commit 08ac9a3870f6babb2b1fff46118536ca8a71ef19 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-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 3d98e909201d..700c39ec99f5 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -318,8 +318,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;