diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -4025,13 +4025,12 @@ static int sysfs_slab_add(struct kmem_cache *s) | |||
4025 | name = create_unique_id(s); | 4025 | name = create_unique_id(s); |
4026 | } | 4026 | } |
4027 | 4027 | ||
4028 | kobject_set_name(&s->kobj, name); | ||
4029 | s->kobj.kset = slab_kset; | 4028 | s->kobj.kset = slab_kset; |
4030 | s->kobj.ktype = &slab_ktype; | 4029 | err = kobject_init_and_add(&s->kobj, &slab_ktype, NULL, name); |
4031 | kobject_init(&s->kobj); | 4030 | if (err) { |
4032 | err = kobject_add(&s->kobj); | 4031 | kobject_put(&s->kobj); |
4033 | if (err) | ||
4034 | return err; | 4032 | return err; |
4033 | } | ||
4035 | 4034 | ||
4036 | err = sysfs_create_group(&s->kobj, &slab_attr_group); | 4035 | err = sysfs_create_group(&s->kobj, &slab_attr_group); |
4037 | if (err) | 4036 | if (err) |