aboutsummaryrefslogtreecommitdiffstats
path: root/fs/freevxfs/vxfs_super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/freevxfs/vxfs_super.c')
-rw-r--r--fs/freevxfs/vxfs_super.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c
index 0ae2c7b8182a..27f66d3e8a04 100644
--- a/fs/freevxfs/vxfs_super.c
+++ b/fs/freevxfs/vxfs_super.c
@@ -155,12 +155,11 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
155 155
156 sbp->s_flags |= MS_RDONLY; 156 sbp->s_flags |= MS_RDONLY;
157 157
158 infp = kmalloc(sizeof(*infp), GFP_KERNEL); 158 infp = kcalloc(1, sizeof(*infp), GFP_KERNEL);
159 if (!infp) { 159 if (!infp) {
160 printk(KERN_WARNING "vxfs: unable to allocate incore superblock\n"); 160 printk(KERN_WARNING "vxfs: unable to allocate incore superblock\n");
161 return -ENOMEM; 161 return -ENOMEM;
162 } 162 }
163 memset(infp, 0, sizeof(*infp));
164 163
165 bsize = sb_min_blocksize(sbp, BLOCK_SIZE); 164 bsize = sb_min_blocksize(sbp, BLOCK_SIZE);
166 if (!bsize) { 165 if (!bsize) {
@@ -196,7 +195,7 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
196#endif 195#endif
197 196
198 sbp->s_magic = rsbp->vs_magic; 197 sbp->s_magic = rsbp->vs_magic;
199 sbp->s_fs_info = (void *)infp; 198 sbp->s_fs_info = infp;
200 199
201 infp->vsi_raw = rsbp; 200 infp->vsi_raw = rsbp;
202 infp->vsi_bp = bp; 201 infp->vsi_bp = bp;
@@ -263,7 +262,7 @@ vxfs_init(void)
263 sizeof(struct vxfs_inode_info), 0, 262 sizeof(struct vxfs_inode_info), 0,
264 SLAB_RECLAIM_ACCOUNT, NULL, NULL); 263 SLAB_RECLAIM_ACCOUNT, NULL, NULL);
265 if (vxfs_inode_cachep) 264 if (vxfs_inode_cachep)
266 return (register_filesystem(&vxfs_fs_type)); 265 return register_filesystem(&vxfs_fs_type);
267 return -ENOMEM; 266 return -ENOMEM;
268} 267}
269 268