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


Groups > linux.kernel > #1645686 > unrolled thread

[PATCH 2/3] f2fs: wake up all waiters in f2fs_submit_discard_endio

Started byChao Yu <chao@kernel.org>
First post2017-05-19 17:50 +0200
Last post2017-05-19 17:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/3] f2fs: wake up all waiters in f2fs_submit_discard_endio Chao Yu <chao@kernel.org> - 2017-05-19 17:50 +0200

#1645686 — [PATCH 2/3] f2fs: wake up all waiters in f2fs_submit_discard_endio

FromChao Yu <chao@kernel.org>
Date2017-05-19 17:50 +0200
Subject[PATCH 2/3] f2fs: wake up all waiters in f2fs_submit_discard_endio
Message-ID<tISk9-4bg-11@gated-at.bofh.it>
From: Chao Yu <yuchao0@huawei.com>

There could be more than one waiter waiting discard IO completion, so we
need use complete_all() instead of complete() in f2fs_submit_discard_endio
to avoid hungtask.

Fixes: 	ec9895add2c5 ("f2fs: don't hold cmd_lock during waiting discard
command")
Cc: <stable@vger.kernel.org>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index d310b82caef1..2b11119d9071 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -751,7 +751,7 @@ static void f2fs_submit_discard_endio(struct bio *bio)
 
 	dc->error = bio->bi_error;
 	dc->state = D_DONE;
-	complete(&dc->wait);
+	complete_all(&dc->wait);
 	bio_put(bio);
 }
 
-- 
2.12.2.575.gb14f27f

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web