All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] fs/io_uring: Remove unnecessary condition in io_write
@ 2021-10-18  6:49 Noah Goldstein
  0 siblings, 0 replies; only message in thread
From: Noah Goldstein @ 2021-10-18  6:49 UTC (permalink / raw)
  Cc: goldstein.w.n, axboe, asml.silence, io-uring, linux-kernel

This commit removes the unnecessary 'force_nonblock' condition from
the if statement. The if statement is already inside of an if whose
condition is 'if (force_nonblock)' so including it here is gratuitous.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 0d7613c7355c..d1e672e7a2d1 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3602,7 +3602,7 @@ static int io_write(struct io_kiocb *req, unsigned int issue_flags)
 			goto copy_iov;
 
 		/* file path doesn't support NOWAIT for non-direct_IO */
-		if (force_nonblock && !(kiocb->ki_flags & IOCB_DIRECT) &&
+		if (!(kiocb->ki_flags & IOCB_DIRECT) &&
 		    (req->flags & REQ_F_ISREG))
 			goto copy_iov;
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-18  6:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18  6:49 [PATCH v1] fs/io_uring: Remove unnecessary condition in io_write Noah Goldstein

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.