diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-09-27 04:49:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:26:10 -0400 |
commit | f8314dc60ccba7e41f425048c4160dc7f63377d5 (patch) | |
tree | 4e361a6e93dc7f64da0244e5a0dfef1fface0ddb /fs/minix | |
parent | 32c2d2bc4bed61323f14f2a7d69ccbd567253d8a (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/minix')
-rw-r--r-- | fs/minix/inode.c | 6 |
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 | ||