summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-01-26 11:55:35 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-02-22 16:07:23 -0800
commit7c506896cf933a07460dd9777ac023382446beac (patch)
tree7e5e2ea4e4e7b2950e9ee9d4b0ba4058ea9a0265 /fs/f2fs
parent688159b6db47a9ebc0b34402bf5df157c45f6a46 (diff)
downloadlinux-7c506896cf933a07460dd9777ac023382446beac.tar.bz2
f2fs: use wq_has_sleeper for cp_wait wait_queue
We need to use wq_has_sleeper including smp_mb to consider cp_wait concurrency. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 16cf8f0bc55f..90b3a3726d80 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -74,8 +74,7 @@ static void f2fs_write_end_io(struct bio *bio)
dec_page_count(sbi, F2FS_WRITEBACK);
}
- if (!get_pages(sbi, F2FS_WRITEBACK) &&
- !list_empty(&sbi->cp_wait.task_list))
+ if (!get_pages(sbi, F2FS_WRITEBACK) && wq_has_sleeper(&sbi->cp_wait))
wake_up(&sbi->cp_wait);
bio_put(bio);