mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
slub: do not fail if we cannot register a slab with sysfs
Do not BUG() if we cannot register a slab with sysfs. Just print an error. The only consequence of not registering is that the slab cache is not visible via /sys/slab. A BUG() may not be visible that early during boot and we have had multiple issues here already. Signed-off-by: Christoph Lameter <clameter@sgi.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4ccdb4c872
commit
5d540fb715
1 changed files with 6 additions and 2 deletions
|
@ -3813,7 +3813,9 @@ static int __init slab_sysfs_init(void)
|
||||||
|
|
||||||
list_for_each_entry(s, &slab_caches, list) {
|
list_for_each_entry(s, &slab_caches, list) {
|
||||||
err = sysfs_slab_add(s);
|
err = sysfs_slab_add(s);
|
||||||
BUG_ON(err);
|
if (err)
|
||||||
|
printk(KERN_ERR "SLUB: Unable to add boot slab %s"
|
||||||
|
" to sysfs\n", s->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (alias_list) {
|
while (alias_list) {
|
||||||
|
@ -3821,7 +3823,9 @@ static int __init slab_sysfs_init(void)
|
||||||
|
|
||||||
alias_list = alias_list->next;
|
alias_list = alias_list->next;
|
||||||
err = sysfs_slab_alias(al->s, al->name);
|
err = sysfs_slab_alias(al->s, al->name);
|
||||||
BUG_ON(err);
|
if (err)
|
||||||
|
printk(KERN_ERR "SLUB: Unable to add boot slab alias"
|
||||||
|
" %s to sysfs\n", s->name);
|
||||||
kfree(al);
|
kfree(al);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue