aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 8655be5b7404..b89a7c99b2fa 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4507,6 +4507,13 @@ static int sysfs_slab_add(struct kmem_cache *s)
4507 4507
4508static void sysfs_slab_remove(struct kmem_cache *s) 4508static void sysfs_slab_remove(struct kmem_cache *s)
4509{ 4509{
4510 if (slab_state < SYSFS)
4511 /*
4512 * Sysfs has not been setup yet so no need to remove the
4513 * cache from sysfs.
4514 */
4515 return;
4516
4510 kobject_uevent(&s->kobj, KOBJ_REMOVE); 4517 kobject_uevent(&s->kobj, KOBJ_REMOVE);
4511 kobject_del(&s->kobj); 4518 kobject_del(&s->kobj);
4512 kobject_put(&s->kobj); 4519 kobject_put(&s->kobj);