From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with SMTP id A5B6B660029 for ; Tue, 3 Aug 2010 22:45:33 -0400 (EDT) Message-Id: <20100804024533.069345035@linux.com> Date: Tue, 03 Aug 2010 21:45:30 -0500 From: Christoph Lameter Subject: [S+Q3 16/23] slub: Get rid of useless function count_free() References: <20100804024514.139976032@linux.com> Content-Disposition: inline; filename=unified_drop_count_free Sender: owner-linux-mm@kvack.org To: Pekka Enberg Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Nick Piggin , David Rientjes List-ID: count_free() == available() Signed-off-by: Christoph Lameter --- mm/slub.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2010-07-30 18:44:54.767739966 -0500 +++ linux-2.6/mm/slub.c 2010-07-30 18:45:24.248349179 -0500 @@ -1697,11 +1697,6 @@ return 1; } -static int count_free(struct page *page) -{ - return available(page); -} - static unsigned long count_partial(struct kmem_cache_node *n, int (*get_count)(struct page *)) { @@ -1750,7 +1745,7 @@ if (!n) continue; - nr_free = count_partial(n, count_free); + nr_free = count_partial(n, available); nr_slabs = node_nr_slabs(n); nr_objs = node_nr_objs(n); @@ -3906,7 +3901,7 @@ x = atomic_long_read(&n->total_objects); else if (flags & SO_OBJECTS) x = atomic_long_read(&n->total_objects) - - count_partial(n, count_free); + count_partial(n, available); else x = atomic_long_read(&n->nr_slabs); @@ -4792,7 +4787,7 @@ nr_partials += n->nr_partial; nr_slabs += atomic_long_read(&n->nr_slabs); nr_objs += atomic_long_read(&n->total_objects); - nr_free += count_partial(n, count_free); + nr_free += count_partial(n, available); } nr_inuse = nr_objs - nr_free; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org