From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756180AbbAZRE3 (ORCPT ); Mon, 26 Jan 2015 12:04:29 -0500 Received: from mx2.parallels.com ([199.115.105.18]:47535 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbbAZRE1 (ORCPT ); Mon, 26 Jan 2015 12:04:27 -0500 Date: Mon, 26 Jan 2015 20:04:18 +0300 From: Vladimir Davydov To: Christoph Lameter CC: Andrew Morton , Pekka Enberg , David Rientjes , Joonsoo Kim , Johannes Weiner , Michal Hocko , , Subject: Re: [PATCH -mm 2/3] slab: zap kmem_cache_shrink return value Message-ID: <20150126170418.GC28978@esperanza> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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