Re: linux-5.7-rc4/fs/io_uring.c:2786: bad if test ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux