From: Colin King <[email protected]>
To: Alexander Viro <[email protected]>,
Jens Axboe <[email protected]>,
[email protected], [email protected]
Cc: [email protected], [email protected]
Subject: [PATCH]i[next] io_uring: remove redundant check on force_nonblock
Date: Tue, 5 May 2020 10:33:43 +0100 [thread overview]
Message-ID: <[email protected]> (raw)
From: Colin Ian King <[email protected]>
The check on force_nonblock is redundant as this is performed
several statements earlier and also returns with -EAGAIN. Remove
the redundant check.
Addresses-Coverity: ("Logicall dead code")
Signed-off-by: Colin Ian King <[email protected]>
---
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 e5dfbbd2aa34..4b1efb062f7f 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2782,7 +2782,7 @@ static int io_splice(struct io_kiocb *req, bool force_nonblock)
poff_in = (sp->off_in == -1) ? NULL : &sp->off_in;
poff_out = (sp->off_out == -1) ? NULL : &sp->off_out;
ret = do_splice(in, poff_in, out, poff_out, sp->len, flags);
- if (force_nonblock && ret == -EAGAIN)
+ if (ret == -EAGAIN)
return -EAGAIN;
io_put_file(req, in, (sp->flags & SPLICE_F_FD_IN_FIXED));
--
2.25.1
next reply other threads:[~2020-05-05 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 9:33 Colin King [this message]
2020-05-05 11:59 ` [PATCH]i[next] io_uring: remove redundant check on force_nonblock Pavel Begunkov
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox