Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a160cb4 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: wake up all waiters in f2fs_submit_discard_endio



commit e31b98215779e66a490471c6ad886ae231316699 upstream.

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: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 7839d430
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -752,7 +752,7 @@ static void f2fs_submit_discard_endio(struct bio *bio, int err)

	dc->error = err;
	dc->state = D_DONE;
	complete(&dc->wait);
	complete_all(&dc->wait);
	bio_put(bio);
}