Char: icom, mark __init as __devinit
[firefly-linux-kernel-4.4.55.git] / drivers / md / bitmap.c
index 5554adaa58f9be01d37bc5623f63384c084e69de..e61e0efe9ec71db54a91916d978ecbda05ec1314 100644 (file)
@@ -863,9 +863,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
 
        /* We need 4 bits per page, rounded up to a multiple of sizeof(unsigned long) */
        bitmap->filemap_attr = kzalloc(
-               (((num_pages*4/8)+sizeof(unsigned long)-1)
-                /sizeof(unsigned long))
-               *sizeof(unsigned long),
+               roundup( DIV_ROUND_UP(num_pages*4, 8), sizeof(unsigned long)),
                GFP_KERNEL);
        if (!bitmap->filemap_attr)
                goto out;