Skip to contentSkip to conversation

ocfs2/dlm: a missed DLM_LOCK_RES_IN_PROGRESS set

PATCH New Wengang Wang 1 participant 2 messages Nov 17, 2010 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2/dlm: a missed DLM_LOCK_RES_IN_PROGRESS set

We set DLM_LOCK_RES_IN_PROGRESS flag when we are processing a lock request. There is a miss in dlmunlock_common.

---
 fs/ocfs2/dlm/dlmunlock.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/ocfs2/dlm/dlmunlock.c +2 -0
index 817287c..ef219ac 100644
@@ -137,6 +137,8 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm,
 		/* ok for this to sleep if not in a network handler */
 		__dlm_wait_on_lockres(res);
 		res->state |= DLM_LOCK_RES_IN_PROGRESS;
+	} else {
+		res->state |= DLM_LOCK_RES_IN_PROGRESS;
 	}
 	spin_lock(&lock->spinlock);
 
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/1 ocfs2/dlm: a missed DLM_LOCK_RES_IN_PROGRESS set

Sorry, I want to take back the two patches.

It seems DLM_LOCK_RES_IN_PROGRESS is needed only for remote work, and for master node, spin lock is enough.
dlmunlock_common() does need some fix since it includes remote case. I will send the fix later.

regards,
wengang.

Quoted 29 lines · Wengang Wang

We set DLM_LOCK_RES_IN_PROGRESS flag when we are processing a lock request. There is a miss in dlmunlock_common.

---
 fs/ocfs2/dlm/dlmunlock.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/ocfs2/dlm/dlmunlock.c +2 -0
index 817287c..ef219ac 100644
@@ -137,6 +137,8 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm,
 		/* ok for this to sleep if not in a network handler */
 		__dlm_wait_on_lockres(res);
 		res->state |= DLM_LOCK_RES_IN_PROGRESS;
+	} else {
+		res->state |= DLM_LOCK_RES_IN_PROGRESS;
 	}
 	spin_lock(&lock->spinlock);
 
Signature · 7 lines
1.7.2.3


_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel