ocfs2: Fix lvb corruption
authorKurt Hackel <kurt.hackel@oracle.com>
Mon, 26 Jun 2006 22:17:47 +0000 (15:17 -0700)
committerMark Fasheh <mark.fasheh@oracle.com>
Mon, 7 Aug 2006 17:54:10 +0000 (10:54 -0700)
Properly ignore LVB flags during a PR downconvert. This avoids an illegal
lvb update.

Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/dlm/dlmunlock.c

index b0c3134..4ce3f82 100644 (file)
@@ -483,6 +483,10 @@ int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data)
 
        /* 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;
@@ -632,6 +636,8 @@ retry:
 
        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) {