aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bitmap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index c100a47bc157..bc552bbad83e 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1694,9 +1694,8 @@ int bitmap_create(struct mddev *mddev)
1694 bitmap->counts.chunkshift = (ffz(~mddev->bitmap_info.chunksize) 1694 bitmap->counts.chunkshift = (ffz(~mddev->bitmap_info.chunksize)
1695 - BITMAP_BLOCK_SHIFT); 1695 - BITMAP_BLOCK_SHIFT);
1696 1696
1697 chunks = (blocks + (1 << bitmap->counts.chunkshift) - 1) >> 1697 chunks = DIV_ROUND_UP_SECTOR_T(blocks, 1 << bitmap->counts.chunkshift);
1698 bitmap->counts.chunkshift; 1698 pages = DIV_ROUND_UP(chunks, PAGE_COUNTER_RATIO);
1699 pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO;
1700 1699
1701 BUG_ON(!pages); 1700 BUG_ON(!pages);
1702 1701