aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmunlock.c
diff options
context:
space:
mode:
authorKurt Hackel <kurt.hackel@oracle.com>2006-06-26 18:17:47 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-08-07 13:54:10 -0400
commit4b1af774451bbc8440719e3fe441934a337c3b63 (patch)
tree98a3e0570887625bab6ccc439d13a2b40a45038b /fs/ocfs2/dlm/dlmunlock.c
parent9f737633e6ee54fc174282d49b2559bd2208391d (diff)
ocfs2: Fix lvb corruption
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>
Diffstat (limited to 'fs/ocfs2/dlm/dlmunlock.c')
-rw-r--r--fs/ocfs2/dlm/dlmunlock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c
index b0c3134f4f70..4ce3f82fb736 100644
--- a/fs/ocfs2/dlm/dlmunlock.c
+++ b/fs/ocfs2/dlm/dlmunlock.c
@@ -483,6 +483,10 @@ int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data)
483 483
484 /* lock was found on queue */ 484 /* lock was found on queue */
485 lksb = lock->lksb; 485 lksb = lock->lksb;
486 if (flags & (LKM_VALBLK|LKM_PUT_LVB) &&
487 lock->ml.type != LKM_EXMODE)
488 flags &= ~(LKM_VALBLK|LKM_PUT_LVB);
489
486 /* unlockast only called on originating node */ 490 /* unlockast only called on originating node */
487 if (flags & LKM_PUT_LVB) { 491 if (flags & LKM_PUT_LVB) {
488 lksb->flags |= DLM_LKSB_PUT_LVB; 492 lksb->flags |= DLM_LKSB_PUT_LVB;
@@ -632,6 +636,8 @@ retry:
632 636
633 spin_lock(&res->spinlock); 637 spin_lock(&res->spinlock);
634 is_master = (res->owner == dlm->node_num); 638 is_master = (res->owner == dlm->node_num);
639 if (flags & LKM_VALBLK && lock->ml.type != LKM_EXMODE)
640 flags &= ~LKM_VALBLK;
635 spin_unlock(&res->spinlock); 641 spin_unlock(&res->spinlock);
636 642
637 if (is_master) { 643 if (is_master) {