From: Philipp Reisner Date: Thu, 24 Jun 2010 10:05:53 +0000 (+0200) Subject: drbd: Allow attach while IO is suspended X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8f488156c0635dcc9c668737d05386113a745ef9;p=openwrt%2Fstaging%2Fblogic.git drbd: Allow attach while IO is suspended Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 921793ca18a5..dc0a9acbfdf1 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -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);