public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, users@nilfs.org
Subject: Re: [PATCH] nilfs2: fix hang problem after bio_alloc() failed
Date: Sun, 21 Jun 2009 13:08:43 +0200	[thread overview]
Message-ID: <87ocshvo78.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20090619.023455.111674749.ryusuke@osrg.net> (Ryusuke Konishi's message of "Fri, 19 Jun 2009 02:34:55 +0900 (JST)")

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.

>  		if (unlikely(err))
>  			return err;

Also gcc generally considers conditions to blocks that
return unlikely, so it's actually superfluous.

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

  reply	other threads:[~2009-06-21 11:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-14  1:32 NILFS2 get stuck after bio_alloc() fail Leandro Lucarella
2009-06-14  1:52 ` 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 [this message]
2009-06-21 12:34             ` [NILFS users] " Ryusuke Konishi
2009-06-23  4:40         ` NILFS2 get stuck after bio_alloc() fail Ryusuke Konishi
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=87ocshvo78.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=konishi.ryusuke@lab.ntt.co.jp \
    --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