[Ocfs2-commits] smushran commits r2886 - branches/ocfs2-1.2/fs/ocfs2/dlm
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Wed Apr 19 21:02:56 CDT 2006
Author: smushran
Signed-off-by: mfasheh
Signed-off-by: khackel
Date: 2006-04-19 21:02:55 -0500 (Wed, 19 Apr 2006)
New Revision: 2886
Modified:
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c
Log:
when calling dlmlock_remote (the calling node is NOT the master) do not call
purge_lockres until the lock resource actually changes. otherwise, the mastery
info on the lockres will go away underneath the caller.
Signed-off-by: mfasheh
Signed-off-by: khackel
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c 2006-04-20 02:00:02 UTC (rev 2885)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c 2006-04-20 02:02:55 UTC (rev 2886)
@@ -200,6 +200,7 @@
struct dlm_lock *lock, int flags)
{
enum dlm_status status = DLM_DENIED;
+ int lockres_changed = 1;
mlog_entry("type=%d\n", lock->ml.type);
mlog(0, "lockres %.*s, flags = 0x%x\n", res->lockname.len,
@@ -229,6 +230,10 @@
dlm_error(status);
dlm_revert_pending_lock(res, lock);
dlm_lock_put(lock);
+ /* do NOT call calc_usage, as this would unhash the remote
+ * lockres before we ever get to use it. treat as if we
+ * never made any change to the lockres. */
+ lockres_changed = 0;
} else if (dlm_is_recovery_lock(res->lockname.name,
res->lockname.len)) {
/* special case for the $RECOVERY lock.
@@ -243,7 +248,8 @@
}
spin_unlock(&res->spinlock);
- dlm_lockres_calc_usage(dlm, res);
+ if (lockres_changed)
+ dlm_lockres_calc_usage(dlm, res);
wake_up(&res->wq);
return status;
More information about the Ocfs2-commits
mailing list