aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs/bitmap.c
diff options
context:
space:
mode:
authorYan Burman <burman.yan@gmail.com>2006-12-06 23:40:32 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:45 -0500
commitb593e48d2bf09c40c0f5165f2f2a10cc3983ea51 (patch)
tree5eba2dd937d9ce14790776542a2835c8e19e2c2f /fs/affs/bitmap.c
parent4d2d3cec1da18123b301270381eb748e5ba4f638 (diff)
[PATCH] affs: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/affs/bitmap.c')
-rw-r--r--fs/affs/bitmap.c3
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;