Whamcloud - gitweb
don't crash an MDS if a client send a reconnect.
authorbraam <braam>
Sun, 8 Sep 2002 20:01:41 +0000 (20:01 +0000)
committerbraam <braam>
Sun, 8 Sep 2002 20:01:41 +0000 (20:01 +0000)
lustre/mds/handler.c

index 49e4344..fa285e6 100644 (file)
@@ -281,7 +281,10 @@ static int mds_connect(struct lustre_handle *conn, struct obd_device *obd,
                 if (!memcmp(cluuid, mcd->mcd_uuid, sizeof(mcd->mcd_uuid))) {
                         LASSERT(exp->exp_obd == obd);
 
-                        LASSERT(list_empty(&exp->exp_conn_chain));
+                        if (!list_empty(&exp->exp_conn_chain)) { 
+                                CERROR("existing uuid/export, list not empty!\n");
+                                RETURN(-EALREADY);
+                        }
                         conn->addr = (__u64) (unsigned long)exp;
                         conn->cookie = exp->exp_cookie;
                         spin_unlock(&obd->obd_dev_lock);