summaryrefslogtreecommitdiffstats
path: root/mm/slab_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index adc42b0..4f72208 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -152,6 +152,14 @@ out_locked:
return NULL;
}
+ if (s->refcount == 1) {
+ err = sysfs_slab_add(s);
+ if (err)
+ printk(KERN_WARNING "kmem_cache_create(%s) failed to"
+ " create sysfs entry. Error %d\n",
+ name, err);
+ }
+
return s;
}
EXPORT_SYMBOL(kmem_cache_create);
OpenPOWER on IntegriCloud