summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-11-07 10:48:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 00:34:01 +0300
commit900960e07966f4705b888778542bbb39c3703e7e (patch)
tree701360fc95269bb13e3798f1dd9f9e1132b278e5
parentb6caf8942e17543a6155ac35cdd86389568613f4 (diff)
downloadlinux-900960e07966f4705b888778542bbb39c3703e7e.tar.xz
block: drbd: remove a stray unlock in __drbd_send_protocol()
[ Upstream commit 8e9c523016cf9983b295e4bc659183d1fa6ef8e0 ] There are two callers of this function and they both unlock the mutex so this ends up being a double unlock. Fixes: 44ed167da748 ("drbd: rcu_read_lock() and rcu_dereference() for tconn->net_conf") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/block/drbd/drbd_main.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 5b248763a672..a18155cdce41 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -786,7 +786,6 @@ int __drbd_send_protocol(struct drbd_connection *connection, enum drbd_packet cm
if (nc->tentative && connection->agreed_pro_version < 92) {
rcu_read_unlock();
- mutex_unlock(&sock->mutex);
drbd_err(connection, "--dry-run is not supported by peer");
return -EOPNOTSUPP;
}