diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-09-08 16:56:54 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-09-21 13:14:59 -0600 |
commit | 9d54bd6a3bb495f2e7e4996efdaf1bef6ad62272 (patch) | |
tree | 9199223147951d0f3b9c7744594c3127395a2332 | |
parent | 6567506b68b0cae3934f1a58b35d709f38fc2e90 (diff) | |
download | linux-stable-9d54bd6a3bb495f2e7e4996efdaf1bef6ad62272.tar.gz linux-stable-9d54bd6a3bb495f2e7e4996efdaf1bef6ad62272.tar.bz2 linux-stable-9d54bd6a3bb495f2e7e4996efdaf1bef6ad62272.zip |
io_uring/iopoll: fix unexpected returns
We may propagate a positive return value of io_run_task_work() out of
io_iopoll_check(), which breaks our tests. io_run_task_work() doesn't
return anything useful for us, ignore the return value.
Fixes: c0e0d6ba25f1 ("io_uring: add IORING_SETUP_DEFER_TASKRUN")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/c442bb87f79cea10b3f857cbd4b9a4f0a0493fa3.1662652536.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | io_uring/io_uring.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 39dda1b7a600..c6c32aa3bfe9 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1435,12 +1435,9 @@ static int io_iopoll_check(struct io_ring_ctx *ctx, long min) u32 tail = ctx->cached_cq_tail; mutex_unlock(&ctx->uring_lock); - ret = io_run_task_work(); + io_run_task_work(); mutex_lock(&ctx->uring_lock); - if (ret < 0) - break; - /* some requests don't go through iopoll_list */ if (tail != ctx->cached_cq_tail || wq_list_empty(&ctx->iopoll_list)) |