aboutsummaryrefslogtreecommitdiffstats
path: root/fs/configfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/configfs/dir.c')
-rw-r--r--fs/configfs/dir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 1814ba446809..34750d5e4ff2 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -72,11 +72,10 @@ static struct configfs_dirent *configfs_new_dirent(struct configfs_dirent * pare
72{ 72{
73 struct configfs_dirent * sd; 73 struct configfs_dirent * sd;
74 74
75 sd = kmem_cache_alloc(configfs_dir_cachep, GFP_KERNEL); 75 sd = kmem_cache_zalloc(configfs_dir_cachep, GFP_KERNEL);
76 if (!sd) 76 if (!sd)
77 return NULL; 77 return NULL;
78 78
79 memset(sd, 0, sizeof(*sd));
80 atomic_set(&sd->s_count, 1); 79 atomic_set(&sd->s_count, 1);
81 INIT_LIST_HEAD(&sd->s_links); 80 INIT_LIST_HEAD(&sd->s_links);
82 INIT_LIST_HEAD(&sd->s_children); 81 INIT_LIST_HEAD(&sd->s_children);
@@ -931,7 +930,7 @@ static int configfs_rmdir(struct inode *dir, struct dentry *dentry)
931 return 0; 930 return 0;
932} 931}
933 932
934struct inode_operations configfs_dir_inode_operations = { 933const struct inode_operations configfs_dir_inode_operations = {
935 .mkdir = configfs_mkdir, 934 .mkdir = configfs_mkdir,
936 .rmdir = configfs_rmdir, 935 .rmdir = configfs_rmdir,
937 .symlink = configfs_symlink, 936 .symlink = configfs_symlink,