diff options
-rw-r--r-- | drivers/md/bitmap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 5554adaa58f9..e61e0efe9ec7 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -863,9 +863,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) | |||
863 | 863 | ||
864 | /* We need 4 bits per page, rounded up to a multiple of sizeof(unsigned long) */ | 864 | /* We need 4 bits per page, rounded up to a multiple of sizeof(unsigned long) */ |
865 | bitmap->filemap_attr = kzalloc( | 865 | bitmap->filemap_attr = kzalloc( |
866 | (((num_pages*4/8)+sizeof(unsigned long)-1) | 866 | roundup( DIV_ROUND_UP(num_pages*4, 8), sizeof(unsigned long)), |
867 | /sizeof(unsigned long)) | ||
868 | *sizeof(unsigned long), | ||
869 | GFP_KERNEL); | 867 | GFP_KERNEL); |
870 | if (!bitmap->filemap_attr) | 868 | if (!bitmap->filemap_attr) |
871 | goto out; | 869 | goto out; |