There are two cases when put_cpu_partial() is invoked. * __slab_free * get_partial_node This patch just makes it cover these two cases and fix one typo in slub_def.h. Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> --- include/linux/slub_def.h | 2 +- mm/slub.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 3a1a1dbc6f49..201a635be846 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -81,7 +81,7 @@ struct kmem_cache_order_objects { */ struct kmem_cache { struct kmem_cache_cpu __percpu *cpu_slab; - /* Used for retriving partial slabs etc */ + /* Used for retrieving partial slabs etc */ slab_flags_t flags; unsigned long min_partial; unsigned int size; /* The size of an object including meta data */ diff --git a/mm/slub.c b/mm/slub.c index 715372a786e3..3db6ce58e92e 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2201,8 +2201,8 @@ static void unfreeze_partials(struct kmem_cache *s, } /* - * Put a page that was just frozen (in __slab_free) into a partial page - * slot if available. + * Put a page that was just frozen (in __slab_free|get_partial_node) into a + * partial page slot if available. * * If we did not find a slot then simply move all the partials to the * per node partial list. -- 2.15.1