From ab0a7f4e1797317a6f0f76fe16cf35d3e908a307 Mon Sep 17 00:00:00 2001 From: nikita Date: Sat, 18 Oct 2008 15:35:00 +0000 Subject: [PATCH] Use LCK_MINMODE rather than 0 to reset lock->l_granted_mode to its initial state. b=16450 --- lustre/ChangeLog | 6 ++++++ lustre/ldlm/ldlm_lock.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index e4052d0..894ae0c 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -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. diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index 27965f4..7c9b3a6 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -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; -- 1.8.3.1