Whamcloud - gitweb
Branch: b1_6
authorwangdi <wangdi>
Fri, 4 Jul 2008 16:17:08 +0000 (16:17 +0000)
committerwangdi <wangdi>
Fri, 4 Jul 2008 16:17:08 +0000 (16:17 +0000)
checking import before put the import, because stale export disconnect
might also trigger this llcd_ctxt_put
b=15684
i=adilger

lustre/ptlrpc/recov_thread.c

index 6bf6145..b930aaa 100644 (file)
@@ -168,8 +168,10 @@ static void ctxt_llcd_put(struct llog_ctxt *ctxt)
                 llcd_put(ctxt->loc_llcd);
                 ctxt->loc_llcd = NULL;
         }
-        class_import_put(ctxt->loc_imp);
-        ctxt->loc_imp = NULL;
+        if (ctxt->loc_imp) {
+                class_import_put(ctxt->loc_imp);
+                ctxt->loc_imp = NULL;
+        }
         mutex_up(&ctxt->loc_sem);
 }