Whamcloud - gitweb
Use LCK_MINMODE rather than 0 to reset lock->l_granted_mode to its initial
authornikita <nikita>
Sat, 18 Oct 2008 15:35:00 +0000 (15:35 +0000)
committernikita <nikita>
Sat, 18 Oct 2008 15:35:00 +0000 (15:35 +0000)
state.
b=16450

lustre/ChangeLog
lustre/ldlm/ldlm_lock.c

index e4052d0..894ae0c 100644 (file)
@@ -1493,6 +1493,12 @@ Details    : Add new LINVRNT() macro, optional on new --enable-invariants
             sanity checks that are too expensive to be left in `production'
             mode.
 
+Severity   : minor
+Bugzilla   : 16450
+Description: Zap lock->l_granted_mode with explicit LCK_MINMODE.
+Details    : Use LCK_MINMODE rather than 0 to reset lock->l_granted_mode to
+            its initial state.
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
index 27965f4..7c9b3a6 100644 (file)
@@ -1640,7 +1640,7 @@ void ldlm_lock_cancel(struct ldlm_lock *lock)
 
         /* Make sure we will not be called again for same lock what is possible
          * if not to zero out lock->l_granted_mode */
-        lock->l_granted_mode = 0;
+        lock->l_granted_mode = LCK_MINMODE;
         unlock_res_and_lock(lock);
 
         EXIT;