Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / fs / kernfs / mount.c
index 36376cc5c9c2111621ec6acab1fb2d0ee26dbd0d..9a4646eecb71bbaababa17828ebde0d5f9bbd700 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "kernfs-internal.h"
 
-struct kmem_cache *kernfs_node_cache;
+struct kmem_cache *kernfs_node_cache, *kernfs_iattrs_cache;
 
 static int kernfs_sop_show_options(struct seq_file *sf, struct dentry *dentry)
 {
@@ -376,4 +376,9 @@ void __init kernfs_init(void)
                                              0,
                                              SLAB_PANIC | SLAB_TYPESAFE_BY_RCU,
                                              NULL);
+
+       /* Creates slab cache for kernfs inode attributes */
+       kernfs_iattrs_cache  = kmem_cache_create("kernfs_iattrs_cache",
+                                             sizeof(struct kernfs_iattrs),
+                                             0, SLAB_PANIC, NULL);
 }