lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 01/14] io_uring: use original request task for inflight tracking
    Date
    From: Jens Axboe <axboe@kernel.dk>

    commit 386e4fb6962b9f248a80f8870aea0870ca603e89 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: 9cae36a094e7 ("io_uring: reinstate the inflight tracking")
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    fs/io_uring.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/io_uring.c
    +++ b/fs/io_uring.c
    @@ -1405,7 +1405,7 @@ static void io_req_track_inflight(struct
    {
    if (!(req->flags & REQ_F_INFLIGHT)) {
    req->flags |= REQ_F_INFLIGHT;
    - atomic_inc(&current->io_uring->inflight_tracked);
    + atomic_inc(&req->task->io_uring->inflight_tracked);
    }
    }


    \
     
     \ /
      Last update: 2022-08-19 17:42    [W:4.291 / U:0.308 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site