lkml.org 
[lkml]   [2010]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 02/10] mm: Remove likely() from mapping_unevictable()
From
Date
On Fri, 2010-12-10 at 16:00 +0900, KOSAKI Motohiro wrote:
> > [ Resending to Nick's real email ]
> >
> >
> > From: Steven Rostedt <srostedt@redhat.com>
> >
> > The mapping_unevictable() has a likely() around the mapping parameter.
> > diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
[]
> > static inline int mapping_unevictable(struct address_space *mapping)
> > {
> > - if (likely(mapping))
> > + if (mapping)
> > return test_bit(AS_UNEVICTABLE, &mapping->flags);
> > return !!mapping;
> > }
> I think you are right.
> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

It'd be better to use

if (!mapping)
return 0;
return test_bit(AS_UNEVICTABLE, &mapping->flags);

to avoid the unnecessary !!



\
 
 \ /
  Last update: 2010-12-10 08:09    [W:0.088 / U:1.132 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site