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 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index f0b5aa9..dac5956 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3710,7 +3710,7 @@ static int any_slab_objects(struct kmem_cache *s) if (!n) continue; - if (n->nr_partial || atomic_long_read(&n->nr_slabs)) + if (atomic_long_read(&n->total_objects)) return 1; } return 0; -- 1.5.4.4