Whamcloud - gitweb
* Don't oops when destroying an export that doesn't have a connection.
authorshaver <shaver>
Wed, 28 Aug 2002 15:27:04 +0000 (15:27 +0000)
committershaver <shaver>
Wed, 28 Aug 2002 15:27:04 +0000 (15:27 +0000)
  (I'm not sure this should happen, but it is, and this'll keep us from
  OOPSing on SMP boxes until I dig deeper.)

lustre/obdclass/genops.c

index 483f0e5..c6c1c3c 100644 (file)
@@ -286,9 +286,11 @@ void class_destroy_export(struct obd_export *exp)
         int rc;
         ENTRY;
 
-        spin_lock(&exp->exp_connection->c_lock);
-        list_del(&exp->exp_chain);
-        spin_unlock(&exp->exp_connection->c_lock);
+        if (exp->exp_connection) {
+                spin_lock(&exp->exp_connection->c_lock);
+                list_del(&exp->exp_chain);
+                spin_unlock(&exp->exp_connection->c_lock);
+        }
 
         /* XXXshaver these bits want to be hung off the export, instead of
          * XXXshaver hard-coded here.