f2fs: clear discard_wake earlier
authorSheng Yong <[email protected]>
Tue, 8 May 2018 09:51:34 +0000 (17:51 +0800)
committerJaegeuk Kim <[email protected]>
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 <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
fs/f2fs/segment.c