Skip to content

Commit

Permalink
block: drbd: remove a stray unlock in __drbd_send_protocol()
Browse files Browse the repository at this point in the history
There are two callers of this function and they both unlock the mutex so
this ends up being a double unlock.

Fixes: 44ed167 ("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>
  • Loading branch information
Dan Carpenter authored and Jens Axboe committed Nov 8, 2019
1 parent b081436 commit 8e9c523
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8e9c523

Please sign in to comment.