aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/sysfs.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-08-22 21:15:43 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2017-08-29 10:05:33 -0700
commit01983c715ad0e78842a885f361ad927a3a985994 (patch)
treedd8995b6626b9b423bcf2e7170f85d55879e65f7 /fs/f2fs/sysfs.c
parentf2fs: return error when accessing insane flie offset (diff)
downloadlinux-dev-01983c715ad0e78842a885f361ad927a3a985994.tar.xz
linux-dev-01983c715ad0e78842a885f361ad927a3a985994.zip
f2fs: wake up discard_thread iff there is a candidate
This patch fixes to avoid needless wake ups. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/sysfs.c')
-rw-r--r--fs/f2fs/sysfs.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index b9ad9041559f..962735dc9c63 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -178,13 +178,9 @@ static ssize_t f2fs_sbi_store(struct f2fs_attr *a,
if (!strcmp(a->attr.name, "iostat_enable") && *ui == 0)
f2fs_reset_iostat(sbi);
if (!strcmp(a->attr.name, "gc_urgent") && t == 1 && sbi->gc_thread) {
- struct discard_cmd_control *dcc = SM_I(sbi)->dcc_info;
-
sbi->gc_thread->gc_wake = 1;
wake_up_interruptible_all(&sbi->gc_thread->gc_wait_queue_head);
-
- dcc->discard_wake = 1;
- wake_up_interruptible_all(&dcc->discard_wait_queue);
+ wake_up_discard_thread(sbi, true);
}
return count;