diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-02-11 14:11:10 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-10-14 10:45:01 -0400 |
commit | 8410da8f0e3ff5c97bce1b10627316be509ce476 (patch) | |
tree | 877eb301ff032bc8b95bcf6556d01470a459f98f /drivers/block/drbd/drbd_main.c | |
parent | dad20554812e73a2bfbe45d1b161d5d3c249e597 (diff) |
drbd: Introduced tconn->cstate_mutex
In compatibility mode with old DRBDs, use that as the state_mutex
as well.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index b64b7388ee9d..1781d0ad35e1 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -1801,7 +1801,8 @@ void drbd_init_set_defaults(struct drbd_conf *mdev) | |||
1801 | atomic_set(&mdev->ap_in_flight, 0); | 1801 | atomic_set(&mdev->ap_in_flight, 0); |
1802 | 1802 | ||
1803 | mutex_init(&mdev->md_io_mutex); | 1803 | mutex_init(&mdev->md_io_mutex); |
1804 | mutex_init(&mdev->state_mutex); | 1804 | mutex_init(&mdev->own_state_mutex); |
1805 | mdev->state_mutex = &mdev->own_state_mutex; | ||
1805 | 1806 | ||
1806 | spin_lock_init(&mdev->al_lock); | 1807 | spin_lock_init(&mdev->al_lock); |
1807 | spin_lock_init(&mdev->peer_seq_lock); | 1808 | spin_lock_init(&mdev->peer_seq_lock); |
@@ -2189,6 +2190,7 @@ struct drbd_tconn *drbd_new_tconn(char *name) | |||
2189 | goto fail; | 2190 | goto fail; |
2190 | 2191 | ||
2191 | tconn->cstate = C_STANDALONE; | 2192 | tconn->cstate = C_STANDALONE; |
2193 | mutex_init(&tconn->cstate_mutex); | ||
2192 | spin_lock_init(&tconn->req_lock); | 2194 | spin_lock_init(&tconn->req_lock); |
2193 | atomic_set(&tconn->net_cnt, 0); | 2195 | atomic_set(&tconn->net_cnt, 0); |
2194 | init_waitqueue_head(&tconn->net_cnt_wait); | 2196 | init_waitqueue_head(&tconn->net_cnt_wait); |