From: Pavel Begunkov Date: Fri, 31 Jan 2020 22:22:08 +0000 (+0300) Subject: io_uring: remove extra ->file check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9250f9ee194dc3dcee28a42a1533fa2cc0edd215;p=linux.git io_uring: remove extra ->file check It won't ever get into io_prep_rw() when req->file haven't been set in io_req_set_file(), hence remove the check. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index 678a1b245e10c..a3c75aff8d108 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1862,9 +1862,6 @@ static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe, unsigned ioprio; int ret; - if (!req->file) - return -EBADF; - if (S_ISREG(file_inode(req->file)->i_mode)) req->flags |= REQ_F_ISREG;