Am Dienstag, den 20.08.2019, 15:13 +0200 schrieb Bjørn Mork :
> Oliver Neukum <oneu...@suse.com> writes:
> 
> > +   wait_event(desc->wait,
> > +                   /*
> > +                    * needs both flags. We cannot do with one
> > +                    * because resetting it would cause a race
> > +                    * with write() yet we need to signal
> > +                    * a disconnect
> > +                    */
> > +                   !test_bit(WDM_IN_USE, &desc->flags) &&
> > +                   test_bit(WDM_DISCONNECTING, &desc->flags));
> 
> I'm confused now...  Won't this condition always be false?
> Should be
> 
>   wait_event(desc->wait,
>              !test_bit(WDM_IN_USE, &desc->flags) ||
>              test_bit(WDM_DISCONNECTING, &desc->flags));
> 
> 
> instead, or?


<censored> <censored> ...

You are right.

        Regards
                Oliver
 

Reply via email to