lkml.org 
[lkml]   [2009]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nilfs2: fix hang problem after bio_alloc() failed
From
Date
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.


\
 
 \ /
  Last update: 2009-06-21 13:11    [W:0.073 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site