summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-06-27 14:04:55 +0300
committerJens Axboe <axboe@kernel.dk>2020-06-28 08:10:16 -0600
commit906a8c3fdbc367325d4200e39212a2a7715b7b0e (patch)
tree1920f1c8e5e187e2542a18de0410069c86c2d031 /fs/io_uring.c
parent8ef77766ba8694968ed4ba24311b4bacee14f235 (diff)
downloadlwn-906a8c3fdbc367325d4200e39212a2a7715b7b0e.tar.gz
lwn-906a8c3fdbc367325d4200e39212a2a7715b7b0e.zip
io_uring: fix punting req w/o grabbed env
It's not enough to check for REQ_F_WORK_INITIALIZED and punt async assuming that io_req_work_grab_env() was called, it may not have been. E.g. io_close_prep() and personality path set the flag without further async init. As a quick fix, always pass next work through io_req_task_queue(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index dcf3ffb5ecf3..483457f6a7df 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1766,12 +1766,8 @@ static void io_free_req(struct io_kiocb *req)
io_req_find_next(req, &nxt);
__io_free_req(req);
- if (nxt) {
- if (nxt->flags & REQ_F_WORK_INITIALIZED)
- io_queue_async_work(nxt);
- else
- io_req_task_queue(nxt);
- }
+ if (nxt)
+ io_req_task_queue(nxt);
}
/*