* Re: linux-5.7-rc4/fs/io_uring.c:2786: bad if test ?
[not found] <DB7PR08MB3801F4B9DD818545A8DA6CC99CA60@DB7PR08MB3801.eurprd08.prod.outlook.com>
@ 2020-05-04 13:47 ` Jens Axboe
0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2020-05-04 13:47 UTC (permalink / raw)
To: David Binderman, [email protected],
[email protected], [email protected],
Linux Kernel Mailing List
On 5/4/20 2:12 AM, David Binderman wrote:
> Hello there,
>
> linux-5.7-rc4/fs/io_uring.c:2786:6: warning: Identical condition 'force_nonblock', second condition is always false [identicalConditionAfterEarlyExit]
>
> Source code is
>
> if (force_nonblock)
> return -EAGAIN;
>
> 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)
> return -EAGAIN;
>
> So the second return can never execute. Suggest code rework.
Looks like that's a leftover of the "only punt sometimes" code. That
second one is indeed dead now, Pavel is re-working the async punt
for 5.8 anyway so I don't think it's worth touching at this point.
--
Jens Axboe
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-04 13:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <DB7PR08MB3801F4B9DD818545A8DA6CC99CA60@DB7PR08MB3801.eurprd08.prod.outlook.com>
2020-05-04 13:47 ` linux-5.7-rc4/fs/io_uring.c:2786: bad if test ? Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox