Linux NILFS development
 help / color / mirror / Atom feed
From: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
To: users@nilfs.org, andi@firstfloor.org
Cc: konishi.ryusuke@lab.ntt.co.jp, linux-kernel@vger.kernel.org
Subject: Re: [NILFS users] [PATCH] nilfs2: fix hang problem after bio_alloc() failed
Date: Sun, 21 Jun 2009 21:34:09 +0900 (JST)	[thread overview]
Message-ID: <20090621.213409.32665554.ryusuke@osrg.net> (raw)
In-Reply-To: <87ocshvo78.fsf@basil.nowhere.org>

Hi Andi,
On Sun, 21 Jun 2009 13:08:43 +0200, Andi Kleen <andi@firstfloor.org> wrote:
> Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> 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
> -- 
> ak@linux.intel.com -- Speaking for myself only.

Regards,
Ryusuke Konishi

  reply	other threads:[~2009-06-21 12:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090614013211.GA22552@homero.springfield.home>
2009-06-14  1:52 ` NILFS2 get stuck after bio_alloc() fail Alberto Bertogli
2009-06-14  6:30   ` Ryusuke Konishi
2009-06-14  7:00     ` Pekka Enberg
2009-06-14 12:34       ` Ryusuke Konishi
2009-06-14  3:45 ` Ryusuke Konishi
2009-06-14 15:32   ` Leandro Lucarella
2009-06-14 18:02     ` Ryusuke Konishi
2009-06-14 18:13       ` Leandro Lucarella
2009-06-18 17:34         ` [PATCH] nilfs2: fix hang problem after bio_alloc() failed Ryusuke Konishi
2009-06-21 11:08           ` Andi Kleen
2009-06-21 12:34             ` Ryusuke Konishi [this message]
     [not found]         ` <20090614181313.GA16597-ukiYB341y+1jWMeXa1+QZ5bDTtF7IOEM@public.gmane.org>
2009-06-23  4:40           ` NILFS2 get stuck after bio_alloc() fail Ryusuke Konishi
     [not found]             ` <20090623.134026.08265083.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-06-23 12:55               ` Leandro Lucarella

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 \
    --in-reply-to=20090621.213409.32665554.ryusuke@osrg.net \
    --to=konishi.ryusuke@lab.ntt.co.jp \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=users@nilfs.org \
    /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