public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 1/6] io_uring: don't check req->file in io_fsync_prep()
Date: Mon,  4 Apr 2022 17:56:21 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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: [email protected] # v5.15+
Signed-off-by: Jens Axboe <[email protected]>
---
 fs/io_uring.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index a8413f006417..9108c56bff5b 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4513,9 +4513,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 ||
-- 
2.35.1


  reply	other threads:[~2022-04-05  1:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 23:56 [PATCHSET v4 0/5] Fix early file assignment for links or drain Jens Axboe
2022-04-04 23:56 ` Jens Axboe [this message]
2022-04-04 23:56 ` [PATCH 2/6] io_uring: defer splice/tee file validity check until command issue Jens Axboe
2022-04-04 23:56 ` [PATCH 3/6] io_uring: move read/write file prep state into actual opcode handler Jens Axboe
2022-04-04 23:56 ` [PATCH 4/6] io_uring: propagate issue_flags state down to file assignment Jens Axboe
2022-04-04 23:56 ` [PATCH 5/6] io_uring: defer " Jens Axboe
2022-04-04 23:56 ` [PATCH 6/6] io_uring: drop the old style inflight file tracking Jens Axboe
2022-04-05 10:04 ` [PATCHSET v4 0/5] Fix early file assignment for links or drain Stefan Metzmacher
2022-04-05 14:43   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox