IO-Uring Archive on lore.kernel.org
 help / color / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: [PATCH 5/7] io_uring: remove extra ->file check in poll prep
Date: Sun, 18 Oct 2020 10:17:41 +0100
Message-ID: <d2a569f6dbbdd7bf2e497bdffe642f0731fee6c2.1603011899.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1603011899.git.asml.silence@gmail.com>

io_poll_add_prep() doesn't need to verify ->file because it's already
done in io_init_req().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 fs/io_uring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index c7ccd2500597..70f4f1ce3011 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5340,8 +5340,6 @@ static int io_poll_add_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe
 		return -EINVAL;
 	if (sqe->addr || sqe->ioprio || sqe->off || sqe->len || sqe->buf_index)
 		return -EINVAL;
-	if (!poll->file)
-		return -EBADF;
 
 	events = READ_ONCE(sqe->poll32_events);
 #ifdef __BIG_ENDIAN
-- 
2.24.0


  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-18  9:17 [PATCH for-5.10 0/7] another pack of random cleanups Pavel Begunkov
2020-10-18  9:17 ` [PATCH 1/7] io_uring: flags-based creds init in queue Pavel Begunkov
2020-10-18  9:17 ` [PATCH 2/7] io_uring: kill ref get/drop in personality init Pavel Begunkov
2020-10-18  9:17 ` [PATCH 3/7] io_uring: inline io_fail_links() Pavel Begunkov
2020-10-18  9:17 ` [PATCH 4/7] io_uring: make cached_cq_overflow non atomic_t Pavel Begunkov
2020-10-18  9:17 ` Pavel Begunkov [this message]
2020-10-18  9:17 ` [PATCH 6/7] io_uring: inline io_poll_task_handler() Pavel Begunkov
2020-10-18  9:17 ` [PATCH 7/7] io_uring: do poll's hash_node init in common code Pavel Begunkov
2020-10-20 14:10 ` [PATCH for-5.10 0/7] another pack of random cleanups 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 \
    --in-reply-to=d2a569f6dbbdd7bf2e497bdffe642f0731fee6c2.1603011899.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git