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: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
4caa74fdce
commit
949249e25f
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user