Commit 378560b8 authored by Chao Yu's avatar Chao Yu Committed by Greg Kroah-Hartman

f2fs: wake up all waiters in f2fs_submit_discard_endio

commit e31b9821 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: 	ec9895ad ("f2fs: don't hold cmd_lock during waiting discard
command")
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9aabcf47
...@@ -751,7 +751,7 @@ static void f2fs_submit_discard_endio(struct bio *bio) ...@@ -751,7 +751,7 @@ static void f2fs_submit_discard_endio(struct bio *bio)
dc->error = bio->bi_error; dc->error = bio->bi_error;
dc->state = D_DONE; dc->state = D_DONE;
complete(&dc->wait); complete_all(&dc->wait);
bio_put(bio); bio_put(bio);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment