aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ceph/messenger.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 07204f19e856..9aaf539942ac 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2330,22 +2330,23 @@ fault:
2330 */ 2330 */
2331static void ceph_fault(struct ceph_connection *con) 2331static void ceph_fault(struct ceph_connection *con)
2332{ 2332{
2333 mutex_lock(&con->mutex);
2334
2333 pr_err("%s%lld %s %s\n", ENTITY_NAME(con->peer_name), 2335 pr_err("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
2334 ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg); 2336 ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
2335 dout("fault %p state %lu to peer %s\n", 2337 dout("fault %p state %lu to peer %s\n",
2336 con, con->state, ceph_pr_addr(&con->peer_addr.in_addr)); 2338 con, con->state, ceph_pr_addr(&con->peer_addr.in_addr));
2337 2339
2338 if (test_bit(LOSSYTX, &con->flags)) {
2339 dout("fault on LOSSYTX channel\n");
2340 goto out;
2341 }
2342
2343 mutex_lock(&con->mutex);
2344 if (test_bit(CLOSED, &con->state)) 2340 if (test_bit(CLOSED, &con->state))
2345 goto out_unlock; 2341 goto out_unlock;
2346 2342
2347 con_close_socket(con); 2343 con_close_socket(con);
2348 2344
2345 if (test_bit(LOSSYTX, &con->flags)) {
2346 dout("fault on LOSSYTX channel\n");
2347 goto out_unlock;
2348 }
2349
2349 if (con->in_msg) { 2350 if (con->in_msg) {
2350 BUG_ON(con->in_msg->con != con); 2351 BUG_ON(con->in_msg->con != con);
2351 con->in_msg->con = NULL; 2352 con->in_msg->con = NULL;
@@ -2392,7 +2393,6 @@ static void ceph_fault(struct ceph_connection *con)
2392 2393
2393out_unlock: 2394out_unlock:
2394 mutex_unlock(&con->mutex); 2395 mutex_unlock(&con->mutex);
2395out:
2396 /* 2396 /*
2397 * in case we faulted due to authentication, invalidate our 2397 * in case we faulted due to authentication, invalidate our
2398 * current tickets so that we can get new ones. 2398 * current tickets so that we can get new ones.