aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorNeilBrown2015-03-02 17:02:29 +1100
committerNeilBrown2015-03-04 12:54:29 +1100
commit935f3d4fc62c1f4d99cd13344762e766cd3bf115 (patch)
tree5e9d796a053b11ccf66c2c57e9e4dd1645416431 /drivers/md/bitmap.c
parentba599aca520d6005138d1e5edb125fb83a130141 (diff)
md/bitmap: fix incorrect DIV_ROUND_UP usage.
DIV_ROUTND_UP doesn't work on "long long", - and it should be sector_t anyway. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index dd8c78043eab..03e0752af99f 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -571,11 +571,11 @@ static int bitmap_read_sb(struct bitmap *bitmap)
re_read:
/* If cluster_slot is set, the cluster is setup */
if (bitmap->cluster_slot >= 0) {
- long long bm_blocks;
+ sector_t bm_blocks;
bm_blocks = bitmap->mddev->resync_max_sectors / (bitmap->mddev->bitmap_info.chunksize >> 9);
bm_blocks = bm_blocks << 3;
- bm_blocks = DIV_ROUND_UP(bm_blocks, 4096);
+ bm_blocks = DIV_ROUND_UP_SECTOR_T(bm_blocks, 4096);
bitmap->mddev->bitmap_info.offset += bitmap->cluster_slot * (bm_blocks << 3);
pr_info("%s:%d bm slot: %d offset: %llu\n", __func__, __LINE__,
bitmap->cluster_slot, (unsigned long long)bitmap->mddev->bitmap_info.offset);