diff options
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 8d680562ba73..2be057b8f568 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -2230,7 +2230,7 @@ static inline void drbd_get_syncer_progress(struct drbd_conf *mdev, | |||
2230 | * Note: currently we don't support such large bitmaps on 32bit | 2230 | * Note: currently we don't support such large bitmaps on 32bit |
2231 | * arch anyways, but no harm done to be prepared for it here. | 2231 | * arch anyways, but no harm done to be prepared for it here. |
2232 | */ | 2232 | */ |
2233 | unsigned int shift = mdev->rs_total >= (1ULL << 32) ? 16 : 10; | 2233 | unsigned int shift = mdev->rs_total > UINT_MAX ? 16 : 10; |
2234 | unsigned long left = *bits_left >> shift; | 2234 | unsigned long left = *bits_left >> shift; |
2235 | unsigned long total = 1UL + (mdev->rs_total >> shift); | 2235 | unsigned long total = 1UL + (mdev->rs_total >> shift); |
2236 | unsigned long tmp = 1000UL - left * 1000UL/total; | 2236 | unsigned long tmp = 1000UL - left * 1000UL/total; |