mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
slub: Allow removal of slab caches during boot
If a slab cache is removed before we have setup sysfs then simply skip over the sysfs handling. Cc: Benjamin Herrenschmidt <[email protected]> Cc: Roland Dreier <[email protected]> Acked-by: David Rientjes <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
This commit is contained in:
parent
d7278bd7d1
commit
f5b801ac38
1 changed files with 7 additions and 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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue