From 069b89384d77c8972a8aa12588e74507714159d4 Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Sun, 18 Oct 2020 10:17:41 +0100 Subject: [PATCH] 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 Signed-off-by: Jens Axboe --- fs/io_uring.c | 2 -- 1 file changed, 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