f2fs: clear discard_wake earlier
authorSheng Yong <shengyong1@huawei.com>
Tue, 8 May 2018 09:51:34 +0000 (17:51 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 31 May 2018 18:31:52 +0000 (11:31 -0700)
commit35a9a766a1b3d57b5f84356954c443db62311b68
tree907d234ee5c47d44374aea38423a14f5b4362f39
parentf9d1dced7583607e066527ee23d804478870d197
f2fs: clear discard_wake earlier

If SBI_NEED_FSCK is set, discard_wake will never be cleared. As a
result, the condition of wait_event_interruptible_timeout() is always
true, which gets discard thread run too frequently.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c