From: shaver Date: Wed, 28 Aug 2002 15:27:04 +0000 (+0000) Subject: * Don't oops when destroying an export that doesn't have a connection. X-Git-Tag: 0.5.5~34 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=adcd71d09c74375261e5d3194cafccae18ab66a8;p=fs%2Flustre-release.git * Don't oops when destroying an export that doesn't have a connection. (I'm not sure this should happen, but it is, and this'll keep us from OOPSing on SMP boxes until I dig deeper.) --- diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 483f0e5..c6c1c3c 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -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.