From 01bcb8f0d4c98dfc12835ccde19abbb0925cd290 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Fri, 15 Feb 2008 23:45:26 -0800 Subject: [PATCH] slub: Simplify any_slab_object checks Since we now have total_objects counter per node use that to check for the presence of any objects. Reviewed-by: Pekka Enberg Signed-off-by: Christoph Lameter --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2008-02-28 18:47:02.929979532 -0800 +++ linux-2.6/mm/slub.c 2008-02-28 18:47:16.090054995 -0800 @@ -3673,7 +3673,7 @@ static int any_slab_objects(struct kmem_ if (!n) continue; - if (n->nr_partial || atomic_long_read(&n->nr_slabs)) + if (atomic_long_read(&n->total_objects)) return 1; } return 0;