diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-03-30 20:06:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-13 21:59:22 +0300 |
commit | 056e1e7c17136cea36267383a43d586509566931 (patch) | |
tree | 956dd2e12d6ae2fe05f676bf51d0b4e3a61743eb /fs | |
parent | 198932a14aeb19a15cf19e51e151d023bc4cd648 (diff) | |
download | linux-056e1e7c17136cea36267383a43d586509566931.tar.xz |
io_uring: don't check req->file in io_fsync_prep()
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 2faa558778ba..e291d5e1e749 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4128,9 +4128,6 @@ static int io_fsync_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { 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 || |