Whamcloud - gitweb
- lmv_disconnect() should drop connected flag upon real disconnecting only
authoralex <alex>
Mon, 19 Jul 2004 09:45:03 +0000 (09:45 +0000)
committeralex <alex>
Mon, 19 Jul 2004 09:45:03 +0000 (09:45 +0000)
- lmv_disconnect() should drop connected flag upon real disconnecting only
- lmv_disconnect() should drop connected flag upon real disconnecting only
- lmv_disconnect() should drop connected flag upon real disconnecting only
- lmv_disconnect() should drop connected flag upon real disconnecting only
- lmv_disconnect() should drop connected flag upon real disconnecting only
- lmv_disconnect() should drop connected flag upon real disconnecting only
- lmv_disconnect() should drop connected flag upon real disconnecting only

lustre/lmv/lmv_obd.c

index 9ed4375..aa24b74 100644 (file)
@@ -299,7 +299,6 @@ int lmv_check_connect(struct obd_device *obd) {
         }
 
         lmv_set_timeouts(obd);
-
         class_export_put(exp);
         return 0;
 
@@ -335,8 +334,6 @@ static int lmv_disconnect(struct obd_export *exp, int flags)
         if (lmv->refcount != 0)
                 goto out_local;
 
-        lmv->connected = 0;
-
         for (i = 0; i < lmv->desc.ld_tgt_count; i++) {
                 if (lmv->tgts[i].ltd_exp == NULL)
                         continue;
@@ -379,6 +376,8 @@ out_local:
         if (!lmv->connected)
                 class_export_put(exp);
         rc = class_disconnect(exp, 0);
+        if (lmv->refcount == 0)
+                lmv->connected = 0;
         RETURN(rc);
 }