[Ocfs2-commits] khackel commits r2919 - branches/ocfs2-1.2/fs/ocfs2/dlm

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Mon Jun 26 13:53:08 CDT 2006


Author: khackel
Signed-off-by: mfasheh
Date: 2006-06-26 13:53:07 -0500 (Mon, 26 Jun 2006)
New Revision: 2919

Modified:
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c
Log:
* fix lvb corruption when an NL or PR makes an illegal update to the lvb

Signed-off-by: mfasheh


Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c	2006-06-23 01:45:30 UTC (rev 2918)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c	2006-06-26 18:53:07 UTC (rev 2919)
@@ -477,6 +477,10 @@
 
 	/* lock was found on queue */
 	lksb = lock->lksb;
+	if (flags & (LKM_VALBLK|LKM_PUT_LVB) &&
+	    lock->ml.type != LKM_EXMODE)
+		flags &= ~(LKM_VALBLK|LKM_PUT_LVB);
+
 	/* unlockast only called on originating node */
 	if (flags & LKM_PUT_LVB) {
 		lksb->flags |= DLM_LKSB_PUT_LVB;
@@ -617,6 +621,8 @@
 
 	spin_lock(&res->spinlock);
 	is_master = (res->owner == dlm->node_num);
+	if (flags & LKM_VALBLK && lock->ml.type != LKM_EXMODE)
+		flags &= ~LKM_VALBLK;
 	spin_unlock(&res->spinlock);
 
 	if (is_master) {




More information about the Ocfs2-commits mailing list