]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
libceph: fix TAG_WAIT case
authorSage Weil <sage@newdream.net>
Thu, 12 May 2011 22:33:17 +0000 (15:33 -0700)
committerSage Weil <sage@newdream.net>
Thu, 19 May 2011 18:25:04 +0000 (11:25 -0700)
If we get a WAIT as a client something went wrong; error out.  And don't
fall through to an unrelated case.

Signed-off-by: Sage Weil <sage@newdream.net>
net/ceph/messenger.c

index 3cdbb8853cd714a69d5b656c85809a8f38903a10..35c0000a658eff22093fef0bded35bb5da05d0c5 100644 (file)
@@ -1355,7 +1355,9 @@ static int process_connect(struct ceph_connection *con)
                 * to WAIT.  This shouldn't happen if we are the
                 * client.
                 */
-               pr_err("process_connect peer connecting WAIT\n");
+               pr_err("process_connect got WAIT as client\n");
+               con->error_msg = "protocol error, got WAIT as client";
+               return -1;
 
        default:
                pr_err("connect protocol error, will retry\n");