lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211018064958.19157-1-goldstein.w.n@gmail.com>
Date:   Mon, 18 Oct 2021 02:49:59 -0400
From:   Noah Goldstein <goldstein.w.n@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     goldstein.w.n@...il.com, axboe@...nel.dk, asml.silence@...il.com,
        io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v1] 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.

Signed-off-by: Noah Goldstein <goldstein.w.n@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ