summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-02-01 01:22:08 +0300
committerJens Axboe <axboe@kernel.dk>2020-02-04 03:27:47 +0300
commit9250f9ee194dc3dcee28a42a1533fa2cc0edd215 (patch)
tree6308c62f4e188ec59e6ec957b05cb5bf35d58b66 /fs/io_uring.c
parent5d204bcfa09330972ad3428a8f81c23f371d3e6d (diff)
downloadlinux-9250f9ee194dc3dcee28a42a1533fa2cc0edd215.tar.xz
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 <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.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 678a1b245e10..a3c75aff8d10 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;