[PATCH] libceph: fix protocol feature mismatch failure path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should not set con->state to CLOSED here; that happens in ceph_fault()
in the caller, where it first asserts that the state is not yet CLOSED.
Avoids a BUG when the features don't match.

Signed-off-by: Sage Weil <sage@xxxxxxxxxxx>
---
 net/ceph/messenger.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 4d111fd..24a5c86 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1508,9 +1508,9 @@ static int process_banner(struct ceph_connection *con)
 
 static void fail_protocol(struct ceph_connection *con)
 {
+	dout("fail_protocol %p\n", con);
 	reset_connection(con);
 	BUG_ON(con->state != CON_STATE_NEGOTIATING);
-	con->state = CON_STATE_CLOSED;
 }
 
 static int process_connect(struct ceph_connection *con)
-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux