summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-03-30 11:06:02 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-13 20:03:20 +0200
commitd63bd1bad8ed2dbd4d22931de677b3dfccec0f8c (patch)
tree343feb583af4ab07a459df48ab130286e972535b
parent6e00309ac716fa8225f0cbde2cd9c24f0e74ee21 (diff)
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>
-rw-r--r--fs/io_uring.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index d4db0b911896..dd132b60f60a 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4155,9 +4155,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 ||