Hi Andi,
On Sun, 21 Jun 2009 13:08:43 +0200, Andi Kleen <[email protected]> wrote:
> Ryusuke Konishi <[email protected]> writes:
> >  
> > diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
> > index 22c7f65..e8f188b 100644
> > --- a/fs/nilfs2/segment.c
> > +++ b/fs/nilfs2/segment.c
> > @@ -1846,26 +1846,13 @@ static int nilfs_segctor_write(struct nilfs_sc_info 
> > *sci,
> >             err = nilfs_segbuf_write(segbuf, &wi);
> >  
> >             res = nilfs_segbuf_wait(segbuf, &wi);
> > -           err = unlikely(err) ? : res;
> > +           err = unlikely(err) ? err : res;
> 
> It's very dubious gcc does anything with unlikely here anyways.
> They typically only work directly in conditions being tested.

I got it. I'll rewrite the first bugfix so that it just removes the
unlikely directive.

-               err = unlikely(err) ? : res;
+               err = err ? : res;


> >             if (unlikely(err))
> >                     return err;
> 
> Also gcc generally considers conditions to blocks that
> return unlikely, so it's actually superfluous.

Thanks, I didn't know this.  I'll take in this, too.
 
> -Andi
> -- 
> [email protected] -- Speaking for myself only.

Regards,
Ryusuke Konishi
_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users

Reply via email to