summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorGu Zheng2014-10-20 11:45:48 +0200
committerJaegeuk Kim2014-11-04 01:07:35 +0100
commit8a2d0ace3af74825e4f1e6fb962f7ee8ef4d9281 (patch)
treefdf2f6417cf32f9aae8efc48cebec09abdd71f9a /fs/f2fs/gc.c
parentf2fs: avoid returning uninitialized value to userspace from f2fs_trim_fs() (diff)
downloadkernel-qcow2-linux-8a2d0ace3af74825e4f1e6fb962f7ee8ef4d9281.tar.gz
kernel-qcow2-linux-8a2d0ace3af74825e4f1e6fb962f7ee8ef4d9281.tar.xz
kernel-qcow2-linux-8a2d0ace3af74825e4f1e6fb962f7ee8ef4d9281.zip
f2fs: remove the seems unneeded argument 'type' from __get_victim
Remove the unneeded argument 'type' from __get_victim, use NO_CHECK_TYPE directly when calling v_ops->get_victim(). Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 2a8f4acdb86b..7151d7de7d95 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -646,12 +646,14 @@ next_iput:
}
static int __get_victim(struct f2fs_sb_info *sbi, unsigned int *victim,
- int gc_type, int type)
+ int gc_type)
{
struct sit_info *sit_i = SIT_I(sbi);
int ret;
+
mutex_lock(&sit_i->sentry_lock);
- ret = DIRTY_I(sbi)->v_ops->get_victim(sbi, victim, gc_type, type, LFS);
+ ret = DIRTY_I(sbi)->v_ops->get_victim(sbi, victim, gc_type,
+ NO_CHECK_TYPE, LFS);
mutex_unlock(&sit_i->sentry_lock);
return ret;
}
@@ -709,7 +711,7 @@ gc_more:
write_checkpoint(sbi, &cpc);
}
- if (!__get_victim(sbi, &segno, gc_type, NO_CHECK_TYPE))
+ if (!__get_victim(sbi, &segno, gc_type))
goto stop;
ret = 0;