aboutsummaryrefslogtreecommitdiffstats
path: root/fs/freevxfs/vxfs_super.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2005-06-30 05:59:05 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-30 11:45:12 -0400
commit8cb681b9c7fff5cb35b5c05ba4f1b7e285e258fb (patch)
treeaf1985fb5aaff49de369c5a0665c63b5e271e77f /fs/freevxfs/vxfs_super.c
parent1d2cc3b87b1694df72ab75cee8e12f8b369577ce (diff)
[PATCH] freevxfs: minor cleanups
This patch addresses the following minor issues: - Typo in printk - Redundant casts - Use C99 struct initializers instead of memset - Parenthesis around return value - Use inline instead of __inline__ Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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