aboutsummaryrefslogtreecommitdiffstats
path: root/fs/minix
diff options
context:
space:
mode:
Diffstat (limited to 'fs/minix')
-rw-r--r--fs/minix/inode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index 330ff9fc7cf0..e24be7fc0651 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -145,11 +145,10 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
145 struct inode *root_inode; 145 struct inode *root_inode;
146 struct minix_sb_info *sbi; 146 struct minix_sb_info *sbi;
147 147
148 sbi = kmalloc(sizeof(struct minix_sb_info), GFP_KERNEL); 148 sbi = kzalloc(sizeof(struct minix_sb_info), GFP_KERNEL);
149 if (!sbi) 149 if (!sbi)
150 return -ENOMEM; 150 return -ENOMEM;
151 s->s_fs_info = sbi; 151 s->s_fs_info = sbi;
152 memset(sbi, 0, sizeof(struct minix_sb_info));
153 152
154 /* N.B. These should be compile-time tests. 153 /* N.B. These should be compile-time tests.
155 Unfortunately that is impossible. */ 154 Unfortunately that is impossible. */
@@ -207,10 +206,9 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
207 if (sbi->s_imap_blocks == 0 || sbi->s_zmap_blocks == 0) 206 if (sbi->s_imap_blocks == 0 || sbi->s_zmap_blocks == 0)
208 goto out_illegal_sb; 207 goto out_illegal_sb;
209 i = (sbi->s_imap_blocks + sbi->s_zmap_blocks) * sizeof(bh); 208 i = (sbi->s_imap_blocks + sbi->s_zmap_blocks) * sizeof(bh);
210 map = kmalloc(i, GFP_KERNEL); 209 map = kzalloc(i, GFP_KERNEL);
211 if (!map) 210 if (!map)
212 goto out_no_map; 211 goto out_no_map;
213 memset(map, 0, i);
214 sbi->s_imap = &map[0]; 212 sbi->s_imap = &map[0];
215 sbi->s_zmap = &map[sbi->s_imap_blocks]; 213 sbi->s_zmap = &map[sbi->s_imap_blocks];
216 214