Skip to contentSkip to conversation

fs/io_uring: Remove unnecessary condition in io_write

PATCH New Noah Goldstein 1 participant 1 message Oct 18, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/io_uring: Remove unnecessary condition in io_write

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.

---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/io_uring.c +1 -1
index 0d7613c7355c..d1e672e7a2d1 100644
@@ -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;
 
Signature · 1 line
2.29.2