]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drbd: Allow attach while IO is suspended
authorPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 24 Jun 2010 10:05:53 +0000 (12:05 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Oct 2010 13:05:32 +0000 (15:05 +0200)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_nl.c

index 921793ca18a5933756ef930ddaad3bcd44ff5f19..dc0a9acbfdf1feb4865d2ff97bc43a96515841f4 100644 (file)
@@ -954,7 +954,7 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
 
        drbd_suspend_io(mdev);
        /* also wait for the last barrier ack. */
-       wait_event(mdev->misc_wait, !atomic_read(&mdev->ap_pending_cnt));
+       wait_event(mdev->misc_wait, !atomic_read(&mdev->ap_pending_cnt) || mdev->state.susp);
        /* and for any other previously queued work */
        drbd_flush_workqueue(mdev);