diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 6a6dde6c51c6..cd0459f0403f 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -1531,6 +1531,21 @@ static int drbd_nl_disconnect(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nl | |||
1531 | struct drbd_nl_cfg_reply *reply) | 1531 | struct drbd_nl_cfg_reply *reply) |
1532 | { | 1532 | { |
1533 | int retcode; | 1533 | int retcode; |
1534 | struct disconnect dc; | ||
1535 | |||
1536 | memset(&dc, 0, sizeof(struct disconnect)); | ||
1537 | if (!disconnect_from_tags(mdev, nlp->tag_list, &dc)) { | ||
1538 | retcode = ERR_MANDATORY_TAG; | ||
1539 | goto fail; | ||
1540 | } | ||
1541 | |||
1542 | if (dc.force) { | ||
1543 | spin_lock_irq(&mdev->req_lock); | ||
1544 | if (mdev->state.conn >= C_WF_CONNECTION) | ||
1545 | _drbd_set_state(_NS(mdev, conn, C_DISCONNECTING), CS_HARD, NULL); | ||
1546 | spin_unlock_irq(&mdev->req_lock); | ||
1547 | goto done; | ||
1548 | } | ||
1534 | 1549 | ||
1535 | retcode = _drbd_request_state(mdev, NS(conn, C_DISCONNECTING), CS_ORDERED); | 1550 | retcode = _drbd_request_state(mdev, NS(conn, C_DISCONNECTING), CS_ORDERED); |
1536 | 1551 | ||