drbd: Fixed an obvious copy-n-paste mistake
authorPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 9 Nov 2011 20:04:03 +0000 (21:04 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 9 May 2012 13:15:57 +0000 (15:15 +0200)
This bug might have caused troubles if disk-barriers and the ahead-behind
more are enabled at the same time.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_receiver.c
drivers/block/drbd/drbd_worker.c

index f0d86cb300cf8703ac8939295ef1c0c0b48fea8d..2e9dfc69828fe8e5f334247790b6f4296b3cc009 100644 (file)
@@ -4437,7 +4437,7 @@ static int got_BarrierAck(struct drbd_conf *mdev, struct p_header80 *h)
 
        if (mdev->state.conn == C_AHEAD &&
            atomic_read(&mdev->ap_in_flight) == 0 &&
-           !test_and_set_bit(AHEAD_TO_SYNC_SOURCE, &mdev->current_epoch->flags)) {
+           !test_and_set_bit(AHEAD_TO_SYNC_SOURCE, &mdev->flags)) {
                mdev->start_resync_timer.expires = jiffies + HZ;
                add_timer(&mdev->start_resync_timer);
        }
index 5fc60f622beda50c096ac2bced2eee2698201af6..56fd69e38298ab172a5b57869bb63ddbcae8ece3 100644 (file)
@@ -746,7 +746,7 @@ int w_start_resync(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
        }
 
        drbd_start_resync(mdev, C_SYNC_SOURCE);
-       clear_bit(AHEAD_TO_SYNC_SOURCE, &mdev->current_epoch->flags);
+       clear_bit(AHEAD_TO_SYNC_SOURCE, &mdev->flags);
        return 1;
 }