public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH] io_uring: Fix getting file for timeout
Date: Thu, 14 Nov 2019 00:11:01 +0300	[thread overview]
Message-ID: <f07037aafc5e272343fbf5f9eeb554d51a4353df.1573679112.git.asml.silence@gmail.com> (raw)

For timeout requests and bunch of others io_uring tries to grab a file
with specified fd, which is usually stdin/fd=0.
Update io_op_needs_file()

Signed-off-by: Pavel Begunkov <[email protected]>
---
 fs/io_uring.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 6aea62f3bfff..0730c54b2153 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2599,6 +2599,10 @@ static bool io_op_needs_file(const struct io_uring_sqe *sqe)
 	switch (op) {
 	case IORING_OP_NOP:
 	case IORING_OP_POLL_REMOVE:
+	case IORING_OP_TIMEOUT:
+	case IORING_OP_TIMEOUT_REMOVE:
+	case IORING_OP_ASYNC_CANCEL:
+	case IORING_OP_LINK_TIMEOUT:
 		return false;
 	default:
 		return true;
-- 
2.24.0


             reply	other threads:[~2019-11-13 21:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 21:11 Pavel Begunkov [this message]
2019-11-13 21:33 ` [PATCH] io_uring: Fix getting file for timeout Jens Axboe
2019-11-13 21:37   ` Jens Axboe
2019-11-13 21:47     ` Pavel Begunkov
2019-11-13 21:54       ` Jens Axboe
2019-11-13 22:05         ` Pavel Begunkov
2019-11-13 22:27           ` Jens Axboe
2019-11-13 21:59       ` [PATCH for-linus] " Pavel Begunkov
2019-11-13 21:59         ` [PATCH for-5.5] io_uring: update io_op_needs_file Pavel Begunkov

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=f07037aafc5e272343fbf5f9eeb554d51a4353df.1573679112.git.asml.silence@gmail.com \
    [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