X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Faffs%2Fbitmap.c;h=b330009fe42dbdb02ca987169981a9e67706e7e4;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=44e322143e393f69f7b106e76df0a312d2f6bddd;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c index 44e322143..b330009fe 100644 --- a/fs/affs/bitmap.c +++ b/fs/affs/bitmap.c @@ -7,15 +7,7 @@ * block allocation, deallocation, calculation of free space. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "affs.h" /* This is, of course, shamelessly stolen from fs/minix */ @@ -297,12 +289,11 @@ int affs_init_bitmap(struct super_block *sb, int *flags) sbi->s_bmap_count = (sbi->s_partition_size - sbi->s_reserved + sbi->s_bmap_bits - 1) / sbi->s_bmap_bits; size = sbi->s_bmap_count * sizeof(*bm); - bm = sbi->s_bitmap = kmalloc(size, GFP_KERNEL); + bm = sbi->s_bitmap = kzalloc(size, GFP_KERNEL); if (!sbi->s_bitmap) { printk(KERN_ERR "AFFS: Bitmap allocation failed\n"); return -ENOMEM; } - memset(sbi->s_bitmap, 0, size); bmap_blk = (__be32 *)sbi->s_root_bh->b_data; blk = sb->s_blocksize / 4 - 49;