[Ocfs2-commits] mfasheh commits r1867 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Jan 28 20:09:19 CST 2005
Author: mfasheh
Date: 2005-01-28 20:09:17 -0600 (Fri, 28 Jan 2005)
New Revision: 1867
Modified:
trunk/fs/ocfs2/dlm/userdlm.c
Log:
* make some statements a bit more explicit
* copy only what we need into lockres->l_name
Modified: trunk/fs/ocfs2/dlm/userdlm.c
===================================================================
--- trunk/fs/ocfs2/dlm/userdlm.c 2005-01-29 02:01:30 UTC (rev 1866)
+++ trunk/fs/ocfs2/dlm/userdlm.c 2005-01-29 02:09:17 UTC (rev 1867)
@@ -393,8 +393,8 @@
/* We only compare against the currently granted level
* here. If the lock is blocked waiting on a downconvert,
* we'll get caught below. */
- if (lockres->l_flags & USER_LOCK_BUSY &&
- level > lockres->l_level) {
+ if ((lockres->l_flags & USER_LOCK_BUSY) &&
+ (level > lockres->l_level)) {
/* is someone sitting in dlm_lock? If so, wait on
* them. */
spin_unlock(&lockres->l_lock);
@@ -403,8 +403,8 @@
goto again;
}
- if (lockres->l_flags & USER_LOCK_BLOCKED &&
- !user_may_continue_on_blocked_lock(lockres, level)) {
+ if ((lockres->l_flags & USER_LOCK_BLOCKED) &&
+ (!user_may_continue_on_blocked_lock(lockres, level))) {
/* is the lock is currently blocked on behalf of
* another node */
spin_unlock(&lockres->l_lock);
@@ -518,7 +518,7 @@
memcpy(lockres->l_name,
dentry->d_name.name,
- USER_DLM_LOCK_ID_MAX_LEN - 1);
+ dentry->d_name.len);
}
int user_dlm_destroy_lock(struct user_lock_res *lockres)
More information about the Ocfs2-commits
mailing list