public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 1/1] io_uring: remove extra ->file check
@ 2020-01-31 22:22 Pavel Begunkov
  2020-01-31 22:24 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2020-01-31 22:22 UTC (permalink / raw)
  To: Jens Axboe, io-uring, linux-kernel

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]>
---
 fs/io_uring.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 799e80e85027..426b0dd81cca 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1868,9 +1868,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;
 
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-31 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-31 22:22 [PATCH 1/1] io_uring: remove extra ->file check Pavel Begunkov
2020-01-31 22:24 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox