Commit 949249e2 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/rw: remove dead file == NULL check



Any read/write opcode has needs_file == true, which means that we
would've failed the request long before reaching the issue stage if we
didn't successfully assign a file. This check has been dead forever,
and is really a leftover from generic code.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4caa74fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -721,7 +721,7 @@ static int io_rw_init_file(struct io_kiocb *req, fmode_t mode)
	struct file *file = req->file;
	int ret;

	if (unlikely(!file || !(file->f_mode & mode)))
	if (unlikely(!(file->f_mode & mode)))
		return -EBADF;

	if (!(req->flags & REQ_F_FIXED_FILE))