diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-12-02 10:35:09 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-12-12 17:09:21 -0500 |
commit | b3bbd3f2ab19c8ca319003b4b51ce4c4ca74da06 (patch) | |
tree | bfb52f0ab116ce2d3f499719df19ea9a2788d209 /net/ceph/messenger.c | |
parent | 0dde584882ade13dc9708d611fbf69b0ae8a9e48 (diff) |
libceph: no need to drop con->mutex for ->get_authorizer()
->get_authorizer(), ->verify_authorizer_reply(), ->sign_message() and
->check_message_signature() shouldn't be doing anything with or on the
connection (like closing it or sending messages).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'net/ceph/messenger.c')
-rw-r--r-- | net/ceph/messenger.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index dba380429a05..770c52701efa 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -1393,15 +1393,9 @@ static struct ceph_auth_handshake *get_connect_authorizer(struct ceph_connection | |||
1393 | return NULL; | 1393 | return NULL; |
1394 | } | 1394 | } |
1395 | 1395 | ||
1396 | /* Can't hold the mutex while getting authorizer */ | ||
1397 | mutex_unlock(&con->mutex); | ||
1398 | auth = con->ops->get_authorizer(con, auth_proto, con->auth_retry); | 1396 | auth = con->ops->get_authorizer(con, auth_proto, con->auth_retry); |
1399 | mutex_lock(&con->mutex); | ||
1400 | |||
1401 | if (IS_ERR(auth)) | 1397 | if (IS_ERR(auth)) |
1402 | return auth; | 1398 | return auth; |
1403 | if (con->state != CON_STATE_NEGOTIATING) | ||
1404 | return ERR_PTR(-EAGAIN); | ||
1405 | 1399 | ||
1406 | con->auth_reply_buf = auth->authorizer_reply_buf; | 1400 | con->auth_reply_buf = auth->authorizer_reply_buf; |
1407 | con->auth_reply_buf_len = auth->authorizer_reply_buf_len; | 1401 | con->auth_reply_buf_len = auth->authorizer_reply_buf_len; |