diff options
-rw-r--r-- | drivers/md/bitmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index e4510c976b34..1fb91edc7de2 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -1590,7 +1590,7 @@ void bitmap_destroy(mddev_t *mddev) | |||
1590 | int bitmap_create(mddev_t *mddev) | 1590 | int bitmap_create(mddev_t *mddev) |
1591 | { | 1591 | { |
1592 | struct bitmap *bitmap; | 1592 | struct bitmap *bitmap; |
1593 | unsigned long blocks = mddev->resync_max_sectors; | 1593 | sector_t blocks = mddev->resync_max_sectors; |
1594 | unsigned long chunks; | 1594 | unsigned long chunks; |
1595 | unsigned long pages; | 1595 | unsigned long pages; |
1596 | struct file *file = mddev->bitmap_file; | 1596 | struct file *file = mddev->bitmap_file; |
@@ -1632,8 +1632,8 @@ int bitmap_create(mddev_t *mddev) | |||
1632 | bitmap->chunkshift = ffz(~bitmap->chunksize); | 1632 | bitmap->chunkshift = ffz(~bitmap->chunksize); |
1633 | 1633 | ||
1634 | /* now that chunksize and chunkshift are set, we can use these macros */ | 1634 | /* now that chunksize and chunkshift are set, we can use these macros */ |
1635 | chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) / | 1635 | chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) >> |
1636 | CHUNK_BLOCK_RATIO(bitmap); | 1636 | CHUNK_BLOCK_SHIFT(bitmap); |
1637 | pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO; | 1637 | pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO; |
1638 | 1638 | ||
1639 | BUG_ON(!pages); | 1639 | BUG_ON(!pages); |