From 530e053962dcfe0a2c3e0f01149411fe8c16d1ef 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-03-31 16:30:22.576669375 -0700 +++ linux-2.6/mm/slub.c 2008-03-31 16:30:27.049171258 -0700 @@ -3727,7 +3727,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;