lkml.org 
[lkml]   [2022]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.17 276/343] io_uring: dont check req->file in io_fsync_prep()
    Date
    From: Jens Axboe <axboe@kernel.dk>

    commit ec858afda857e361182ceafc3d2ba2b164b8e889 upstream.

    This is a leftover from the really old days where we weren't able to
    track and error early if we need a file and it wasn't assigned. Kill
    the check.

    Cc: stable@vger.kernel.org # v5.15+
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    fs/io_uring.c | 3 ---
    1 file changed, 3 deletions(-)

    --- a/fs/io_uring.c
    +++ b/fs/io_uring.c
    @@ -4245,9 +4245,6 @@ static int io_fsync_prep(struct io_kiocb
    {
    struct io_ring_ctx *ctx = req->ctx;

    - if (!req->file)
    - return -EBADF;
    -
    if (unlikely(ctx->flags & IORING_SETUP_IOPOLL))
    return -EINVAL;
    if (unlikely(sqe->addr || sqe->ioprio || sqe->buf_index ||

    \
     
     \ /
      Last update: 2022-04-12 10:58    [W:4.076 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site