From e24ca74a35bdaa24f6f3470b1f492ed3ed7d6771 Mon Sep 17 00:00:00 2001 From: shaver Date: Fri, 10 Oct 2003 19:55:12 +0000 Subject: [PATCH] b=2099: protect ldlm_cancel_locks_for_export from races with lock granting and cancellation. Do one cancel_for_export at disconnect time, and another at export destroy time to catch stragglers. --- lustre/ldlm/ldlm_lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 8937916..03cca52 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -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); } /* -- 1.8.3.1