summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm
diff options
context:
space:
mode:
authorKurt Hackel <kurt.hackel@oracle.com>2006-06-27 00:17:47 +0200
committerMark Fasheh <mark.fasheh@oracle.com>2006-08-07 19:54:10 +0200
commit4b1af774451bbc8440719e3fe441934a337c3b63 (patch)
tree98a3e0570887625bab6ccc439d13a2b40a45038b /fs/ocfs2/dlm
parentLinux v2.6.18-rc4 (diff)
downloadlinux-4b1af774451bbc8440719e3fe441934a337c3b63.tar.xz
linux-4b1af774451bbc8440719e3fe441934a337c3b63.zip
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')
-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)
/* 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) {