aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bfs
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2006-09-27 04:49:37 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:26:10 -0400
commitf8314dc60ccba7e41f425048c4160dc7f63377d5 (patch)
tree4e361a6e93dc7f64da0244e5a0dfef1fface0ddb /fs/bfs
parent32c2d2bc4bed61323f14f2a7d69ccbd567253d8a (diff)
[PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to kzalloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Jffs2-bit-acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/bfs')
-rw-r--r--fs/bfs/inode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index cf74f3d4d96..3e4d6c767b9 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -311,11 +311,10 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
311 unsigned i, imap_len; 311 unsigned i, imap_len;
312 struct bfs_sb_info * info; 312 struct bfs_sb_info * info;
313 313
314 info = kmalloc(sizeof(*info), GFP_KERNEL); 314 info = kzalloc(sizeof(*info), GFP_KERNEL);
315 if (!info) 315 if (!info)
316 return -ENOMEM; 316 return -ENOMEM;
317 s->s_fs_info = info; 317 s->s_fs_info = info;
318 memset(info, 0, sizeof(*info));
319 318
320 sb_set_blocksize(s, BFS_BSIZE); 319 sb_set_blocksize(s, BFS_BSIZE);
321 320
@@ -338,10 +337,9 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
338 + BFS_ROOT_INO - 1; 337 + BFS_ROOT_INO - 1;
339 338
340 imap_len = info->si_lasti/8 + 1; 339 imap_len = info->si_lasti/8 + 1;
341 info->si_imap = kmalloc(imap_len, GFP_KERNEL); 340 info->si_imap = kzalloc(imap_len, GFP_KERNEL);
342 if (!info->si_imap) 341 if (!info->si_imap)
343 goto out; 342 goto out;
344 memset(info->si_imap, 0, imap_len);
345 for (i=0; i<BFS_ROOT_INO; i++) 343 for (i=0; i<BFS_ROOT_INO; i++)
346 set_bit(i, info->si_imap); 344 set_bit(i, info->si_imap);
347 345