From adcd71d09c74375261e5d3194cafccae18ab66a8 Mon Sep 17 00:00:00 2001 From: shaver Date: Wed, 28 Aug 2002 15:27:04 +0000 Subject: [PATCH] * 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.) --- lustre/obdclass/genops.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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. -- 1.8.3.1