Skip to content

Commit 3746d62

Browse files
axboegregkh
authored andcommitted
io_uring: use original request task for inflight tracking
commit 386e4fb upstream. 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: 9cae36a ("io_uring: reinstate the inflight tracking") Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 374bf3f commit 3746d62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ static void io_req_track_inflight(struct io_kiocb *req)
14051405
{
14061406
if (!(req->flags & REQ_F_INFLIGHT)) {
14071407
req->flags |= REQ_F_INFLIGHT;
1408-
atomic_inc(&current->io_uring->inflight_tracked);
1408+
atomic_inc(&req->task->io_uring->inflight_tracked);
14091409
}
14101410
}
14111411

0 commit comments

Comments
 (0)