aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-04-29 22:38:01 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-29 22:38:01 -0400
commit49e1900d4cc2e7bcecb681fe60f0990bec2dcce8 (patch)
tree253801ebf57e0a23856a2c7be129c2c178f62fdf /drivers/md/bitmap.c
parent34f6d749c0a328817d5e36274e53121c1db734dc (diff)
parentb9099ff63c75216d6ca10bce5a1abcd9293c27e6 (diff)
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c4
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;