summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2019-11-14 00:59:19 +0300
committerJens Axboe <axboe@kernel.dk>2019-11-14 01:25:57 +0300
commit5683e5406e94ae1bfb0d9516a18fdb281d0f8d1d (patch)
treeeda53d05290cfe98a1976d3c23e58cf60f859857 /fs
parente3a5d8e386c3fb973fa75f2403622a8f3640ec06 (diff)
downloadlinux-5683e5406e94ae1bfb0d9516a18fdb281d0f8d1d.tar.xz
io_uring: Fix getting file for timeout
For timeout requests 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 <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 87beca4377f7..57ea54d5b0fb 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2298,6 +2298,7 @@ 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:
return false;
default:
return true;