Whamcloud - gitweb
b=2099: protect ldlm_cancel_locks_for_export from races with lock granting
authorshaver <shaver>
Fri, 10 Oct 2003 19:55:12 +0000 (19:55 +0000)
committershaver <shaver>
Fri, 10 Oct 2003 19:55:12 +0000 (19:55 +0000)
        and cancellation.  Do one cancel_for_export at disconnect time, and
another at export destroy time to catch stragglers.

lustre/ldlm/ldlm_lib.c

index 8937916..03cca52 100644 (file)
@@ -375,6 +375,10 @@ void target_destroy_export(struct obd_export *exp)
            exports created by lctl don't have an import */
         if (exp->exp_imp_reverse != NULL)
                 class_destroy_import(exp->exp_imp_reverse);
+
+        /* We cancel locks at disconnect time, but this will catch any locks
+         * granted in a race with recovery-induced disconnect. */
+        ldlm_cancel_locks_for_export(exp);
 }
 
 /*