summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-10-18 12:17:41 +0300
committerJens Axboe <axboe@kernel.dk>2020-10-19 22:29:29 +0300
commit069b89384d77c8972a8aa12588e74507714159d4 (patch)
tree454169f2118ee353a86a0a3e2d7e601ec1023127 /fs/io_uring.c
parent2c3bac6dd6c7af4cb38d1a67cafd29e96ba1fea7 (diff)
downloadlinux-069b89384d77c8972a8aa12588e74507714159d4.tar.xz
io_uring: remove extra ->file check in poll prep
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> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 620a11f9795a..9f65ec8a78fe 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5347,8 +5347,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