[Ocfs2-commits] mfasheh commits r1457 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Sep 10 20:24:41 CDT 2004
Author: mfasheh
Date: 2004-09-10 20:24:39 -0500 (Fri, 10 Sep 2004)
New Revision: 1457
Modified:
trunk/src/dlm.c
Log:
* un obfuscate a conditional.
* only clear the readonly bit if we're not the owner.
Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c 2004-09-11 01:22:46 UTC (rev 1456)
+++ trunk/src/dlm.c 2004-09-11 01:24:39 UTC (rev 1457)
@@ -257,8 +257,7 @@
owner_dead = !(no_owner ||
ocfs_node_is_alive(&osb->publ_map,
lockres->master_node_num));
- if ((owner_dead || wait_on_recovery) &&
- test_bit(LOCK_STATE_READONLY, &lockres->readonly_state)) {
+ if (owner_dead || wait_on_recovery) {
// if owner is dead or in recovery and the lockres
// has the readonly flag set, clear it
clear_bit(LOCK_STATE_READONLY, &lockres->readonly_state);
@@ -299,7 +298,8 @@
#warning NEED MORE HANDLING HERE NOW FOR DROPPING LOCAL READONLY!!!
// anything else is NOT a readonly request
- clear_bit(LOCK_STATE_READONLY, &lockres->readonly_state);
+ if (lockres->master_node_num != osb->node_num)
+ clear_bit(LOCK_STATE_READONLY, &lockres->readonly_state);
status = ocfs_wait_for_readonly_drop(osb, inode);
if (status < 0) {
More information about the Ocfs2-commits
mailing list