diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-06-23 19:06:43 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-06-23 19:06:43 +0200 |
commit | 386e4fb6962b9f248a80f8870aea0870ca603e89 (patch) | |
tree | dcd043471434015e5286040a3c1151976a5755a3 /fs/io_uring.c | |
parent | io_uring: move io_uring_get_opcode out of TP_printk (diff) | |
download | linux-386e4fb6962b9f248a80f8870aea0870ca603e89.tar.xz linux-386e4fb6962b9f248a80f8870aea0870ca603e89.zip |
io_uring: use original request task for inflight tracking
In prior kernels, we did file assignment always at prep time. This meant
that req->task == current. But after deferring that assignment and then
pushing the inflight tracking back in, we've got the inflight tracking
using current when it should in fact now be using req->task.
Fixup that error introduced by adding the inflight tracking back after
file assignments got modifed.
Fixes: 9cae36a094e7 ("io_uring: reinstate the inflight tracking")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 5c95755619e2..5ff2cdb425bc 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1975,7 +1975,7 @@ static inline void io_req_track_inflight(struct io_kiocb *req) { if (!(req->flags & REQ_F_INFLIGHT)) { req->flags |= REQ_F_INFLIGHT; - atomic_inc(¤t->io_uring->inflight_tracked); + atomic_inc(&req->task->io_uring->inflight_tracked); } } |