aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_bitmap.c')
-rw-r--r--drivers/block/drbd/drbd_bitmap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index aa7e23cf7e22..e3f88d6e1412 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -519,7 +519,7 @@ int drbd_bm_resize(struct drbd_conf *mdev, sector_t capacity, int set_new_bits)
519 obits = b->bm_bits; 519 obits = b->bm_bits;
520 520
521 growing = bits > obits; 521 growing = bits > obits;
522 if (opages) 522 if (opages && growing && set_new_bits)
523 bm_set_surplus(b); 523 bm_set_surplus(b);
524 524
525 b->bm_pages = npages; 525 b->bm_pages = npages;
@@ -532,9 +532,6 @@ int drbd_bm_resize(struct drbd_conf *mdev, sector_t capacity, int set_new_bits)
532 if (set_new_bits) { 532 if (set_new_bits) {
533 bm_memset(b, owords, 0xff, words-owords); 533 bm_memset(b, owords, 0xff, words-owords);
534 b->bm_set += bits - obits; 534 b->bm_set += bits - obits;
535 __bm_change_bits_to(mdev, obits,
536 ALIGN(obits, BITS_PER_LONG),
537 1, KM_IRQ1);
538 } else 535 } else
539 bm_memset(b, owords, 0x00, words-owords); 536 bm_memset(b, owords, 0x00, words-owords);
540 537