Whamcloud - gitweb
* set l_resource to NULL when it is freed
authorrread <rread>
Tue, 8 Oct 2002 06:27:04 +0000 (06:27 +0000)
committerrread <rread>
Tue, 8 Oct 2002 06:27:04 +0000 (06:27 +0000)
lustre/ldlm/ldlm_lock.c

index 922b2c9..7f28e9e 100644 (file)
@@ -150,7 +150,8 @@ void ldlm_lock_put(struct ldlm_lock *lock)
         if (lock->l_refc < 0)
                 LBUG();
 
-        ldlm_resource_put(lock->l_resource);
+        if (ldlm_resource_put(lock->l_resource))
+                lock->l_resource = NULL;
         if (lock->l_parent)
                 LDLM_LOCK_PUT(lock->l_parent);