aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bfs/inode.c')
-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 cf74f3d4d966..3e4d6c767b9b 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