mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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>
This commit is contained in:
parent
19880e6e5f
commit
08ac9a3870
1 changed files with 1 additions and 2 deletions
|
@ -323,8 +323,7 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi,
|
||||||
p.min_cost = get_max_cost(sbi, &p);
|
p.min_cost = get_max_cost(sbi, &p);
|
||||||
|
|
||||||
if (*result != NULL_SEGNO) {
|
if (*result != NULL_SEGNO) {
|
||||||
if (IS_DATASEG(get_seg_entry(sbi, *result)->type) &&
|
if (get_valid_blocks(sbi, *result, false) &&
|
||||||
get_valid_blocks(sbi, *result, false) &&
|
|
||||||
!sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result)))
|
!sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result)))
|
||||||
p.min_segno = *result;
|
p.min_segno = *result;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in a new issue