Skip to content

Commit 202700e

Browse files
committed
io_uring: grab any needed state during defer prep
Always grab work environment for deferred links. The assumption that we will be running it always from the task in question is false, as exiting tasks may mean that we're deferring this one to a thread helper. And at that point it's too late to grab the work environment. Fixes: debb85f ("io_uring: factor out grab_env() from defer_prep()") Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent c127a2a commit 202700e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/io_uring.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5449,6 +5449,8 @@ static int io_req_defer_prep(struct io_kiocb *req,
54495449
if (unlikely(ret))
54505450
return ret;
54515451

5452+
io_prep_async_work(req);
5453+
54525454
switch (req->opcode) {
54535455
case IORING_OP_NOP:
54545456
break;

0 commit comments

Comments
 (0)