Skip to content

Commit 9250f9e

Browse files
isilenceaxboe
authored andcommitted
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 5d204bc commit 9250f9e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/io_uring.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,9 +1862,6 @@ static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe,
18621862
unsigned ioprio;
18631863
int ret;
18641864

1865-
if (!req->file)
1866-
return -EBADF;
1867-
18681865
if (S_ISREG(file_inode(req->file)->i_mode))
18691866
req->flags |= REQ_F_ISREG;
18701867

0 commit comments

Comments
 (0)