diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -4507,6 +4507,13 @@ static int sysfs_slab_add(struct kmem_cache *s) static void sysfs_slab_remove(struct kmem_cache *s) { + if (slab_state < SYSFS) + /* + * Sysfs has not been setup yet so no need to remove the + * cache from sysfs. + */ + return; + kobject_uevent(&s->kobj, KOBJ_REMOVE); kobject_del(&s->kobj); kobject_put(&s->kobj); |