aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_nl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_nl.c')
-rw-r--r--drivers/block/drbd/drbd_nl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 75caac70aaae..45a84fa660a2 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -731,7 +731,7 @@ char *ppsize(char *buf, unsigned long long size)
731void drbd_suspend_io(struct drbd_conf *mdev) 731void drbd_suspend_io(struct drbd_conf *mdev)
732{ 732{
733 set_bit(SUSPEND_IO, &mdev->flags); 733 set_bit(SUSPEND_IO, &mdev->flags);
734 if (is_susp(mdev->state)) 734 if (drbd_suspended(mdev))
735 return; 735 return;
736 wait_event(mdev->misc_wait, !atomic_read(&mdev->ap_bio_cnt)); 736 wait_event(mdev->misc_wait, !atomic_read(&mdev->ap_bio_cnt));
737} 737}
@@ -1355,7 +1355,7 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)
1355 1355
1356 drbd_suspend_io(mdev); 1356 drbd_suspend_io(mdev);
1357 /* also wait for the last barrier ack. */ 1357 /* also wait for the last barrier ack. */
1358 wait_event(mdev->misc_wait, !atomic_read(&mdev->ap_pending_cnt) || is_susp(mdev->state)); 1358 wait_event(mdev->misc_wait, !atomic_read(&mdev->ap_pending_cnt) || drbd_suspended(mdev));
1359 /* and for any other previously queued work */ 1359 /* and for any other previously queued work */
1360 drbd_flush_workqueue(mdev); 1360 drbd_flush_workqueue(mdev);
1361 1361