Whamcloud - gitweb
brown paper bag bug in the lock cleanups; I'm amazed this passed as many tests
authorphil <phil>
Sat, 12 Feb 2005 23:15:20 +0000 (23:15 +0000)
committerphil <phil>
Sat, 12 Feb 2005 23:15:20 +0000 (23:15 +0000)
as it did, but here we are.

lustre/ldlm/ldlm_lock.c

index ad3cb9a..9f18891 100644 (file)
@@ -1022,12 +1022,12 @@ void ldlm_lock_cancel(struct ldlm_lock *lock)
         struct ldlm_namespace *ns;
         ENTRY;
 
-        l_lock(&ns->ns_lock);
-        ldlm_del_waiting_lock(lock);
-
         res = lock->l_resource;
         ns = res->lr_namespace;
 
+        l_lock(&ns->ns_lock);
+        ldlm_del_waiting_lock(lock);
+
         /* Please do not, no matter how tempting, remove this LBUG without
          * talking to me first. -phik */
         if (lock->l_readers || lock->l_writers) {