Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1318328 > unrolled thread

[PATCH] f2fs: use wq_has_sleeper for cp_wait wait_queue

Started byJaegeuk Kim <jaegeuk@kernel.org>
First post2016-01-26 21:10 +0100
Last post2016-01-26 21:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] f2fs: use wq_has_sleeper for cp_wait wait_queue Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-26 21:10 +0100

#1318328 — [PATCH] f2fs: use wq_has_sleeper for cp_wait wait_queue

FromJaegeuk Kim <jaegeuk@kernel.org>
Date2016-01-26 21:10 +0100
Subject[PATCH] f2fs: use wq_has_sleeper for cp_wait wait_queue
Message-ID<qVi66-No-11@gated-at.bofh.it>
We need to use wq_has_sleeper including smp_mb to consider cp_wait concurrency.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/data.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index d0675e5..df4d4cc 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);
-- 
2.6.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web