diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-08-31 02:56:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-31 04:42:22 -0400 |
commit | 5d540fb71552b9f2c542bea967200c48be2d8ef6 (patch) | |
tree | af328bd4d12b2b91c6fa53af94a78fcc370562ce /mm/slub.c | |
parent | 4ccdb4c8727c9963c7aa0d6301df283cf1f8a731 (diff) |
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>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3813,7 +3813,9 @@ static int __init slab_sysfs_init(void) | |||
3813 | 3813 | ||
3814 | list_for_each_entry(s, &slab_caches, list) { | 3814 | list_for_each_entry(s, &slab_caches, list) { |
3815 | err = sysfs_slab_add(s); | 3815 | err = sysfs_slab_add(s); |
3816 | BUG_ON(err); | 3816 | if (err) |
3817 | printk(KERN_ERR "SLUB: Unable to add boot slab %s" | ||
3818 | " to sysfs\n", s->name); | ||
3817 | } | 3819 | } |
3818 | 3820 | ||
3819 | while (alias_list) { | 3821 | while (alias_list) { |
@@ -3821,7 +3823,9 @@ static int __init slab_sysfs_init(void) | |||
3821 | 3823 | ||
3822 | alias_list = alias_list->next; | 3824 | alias_list = alias_list->next; |
3823 | err = sysfs_slab_alias(al->s, al->name); | 3825 | err = sysfs_slab_alias(al->s, al->name); |
3824 | BUG_ON(err); | 3826 | if (err) |
3827 | printk(KERN_ERR "SLUB: Unable to add boot slab alias" | ||
3828 | " %s to sysfs\n", s->name); | ||
3825 | kfree(al); | 3829 | kfree(al); |
3826 | } | 3830 | } |
3827 | 3831 | ||