All of lore.kernel.org
 help / color / mirror / Atom feed
From: Noah Goldstein <goldstein.w.n@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: goldstein.w.n@gmail.com, axboe@kernel.dk, asml.silence@gmail.com,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1] fs/io_uring: Remove unnecessary condition in io_write
Date: Mon, 18 Oct 2021 02:49:59 -0400	[thread overview]
Message-ID: <20211018064958.19157-1-goldstein.w.n@gmail.com> (raw)

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


                 reply	other threads:[~2021-10-18  6:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211018064958.19157-1-goldstein.w.n@gmail.com \
    --to=goldstein.w.n@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.