Whamcloud - gitweb
Land b_smallfix onto HEAD (20040213_1402)
[fs/lustre-release.git] / lustre / ptlrpc / recover.c
index a569ab7..6c3a68b 100644 (file)
@@ -191,7 +191,10 @@ int ptlrpc_resend(struct obd_import *imp)
         /* Well... what if lctl recover is called twice at the same time?
          */
         spin_lock_irqsave(&imp->imp_lock, flags);
-        LASSERT(imp->imp_state == LUSTRE_IMP_RECOVER);
+        if (imp->imp_state != LUSTRE_IMP_RECOVER) {
+                spin_unlock_irqrestore(&imp->imp_lock, flags);
+                RETURN(-1);
+        }
         spin_unlock_irqrestore(&imp->imp_lock, flags);
 
         list_for_each_safe(tmp, pos, &imp->imp_sending_list) {