diff options
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/bitmap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c index b0b953683c1a..b330009fe42d 100644 --- a/fs/affs/bitmap.c +++ b/fs/affs/bitmap.c | |||
@@ -289,12 +289,11 @@ int affs_init_bitmap(struct super_block *sb, int *flags) | |||
289 | sbi->s_bmap_count = (sbi->s_partition_size - sbi->s_reserved + | 289 | sbi->s_bmap_count = (sbi->s_partition_size - sbi->s_reserved + |
290 | sbi->s_bmap_bits - 1) / sbi->s_bmap_bits; | 290 | sbi->s_bmap_bits - 1) / sbi->s_bmap_bits; |
291 | size = sbi->s_bmap_count * sizeof(*bm); | 291 | size = sbi->s_bmap_count * sizeof(*bm); |
292 | bm = sbi->s_bitmap = kmalloc(size, GFP_KERNEL); | 292 | bm = sbi->s_bitmap = kzalloc(size, GFP_KERNEL); |
293 | if (!sbi->s_bitmap) { | 293 | if (!sbi->s_bitmap) { |
294 | printk(KERN_ERR "AFFS: Bitmap allocation failed\n"); | 294 | printk(KERN_ERR "AFFS: Bitmap allocation failed\n"); |
295 | return -ENOMEM; | 295 | return -ENOMEM; |
296 | } | 296 | } |
297 | memset(sbi->s_bitmap, 0, size); | ||
298 | 297 | ||
299 | bmap_blk = (__be32 *)sbi->s_root_bh->b_data; | 298 | bmap_blk = (__be32 *)sbi->s_root_bh->b_data; |
300 | blk = sb->s_blocksize / 4 - 49; | 299 | blk = sb->s_blocksize / 4 - 49; |