lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm 2/3] slab: zap kmem_cache_shrink return value
On Mon, Jan 26, 2015 at 09:49:47AM -0600, Christoph Lameter wrote:
> On Mon, 26 Jan 2015, Vladimir Davydov wrote:
>
> > @@ -2400,11 +2400,16 @@ int __kmem_cache_shrink(struct kmem_cache *cachep)
> > return (ret ? 1 : 0);
> > }
> >
> > +void __kmem_cache_shrink(struct kmem_cache *cachep)
> > +{
> > + __cache_shrink(cachep);
> > +}
> > +
>
> Why do we need this wrapper? Rename __cache_shrink to __kmem_cache_shrink
> instead?
>

__cache_shrink() is used not only in __kmem_cache_shrink(), but also in
SLAB's __kmem_cache_shutdown(), where we do need its return value to
check if the cache is empty.

Thanks,
Vladimir


\
 
 \ /
  Last update: 2015-01-26 18:21    [W:0.095 / U:1.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site