projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d204bc
)
io_uring: remove extra ->file check
author
Pavel Begunkov
<asml.silence@gmail.com>
Fri, 31 Jan 2020 22:22:08 +0000
(
01:22
+0300)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 4 Feb 2020 00:27:47 +0000
(17:27 -0700)
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>
fs/io_uring.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 678a1b245e10cf16fbe547fd12781d0717860b9c..a3c75aff8d108e15add87a0361095d4a0e4e675c 100644
(file)
--- 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;