summary refs log tree commit diff
path: root/fs/dlm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-23 18:22:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-23 18:22:42 -0700
commit721b024bd47c1e4b995e7eeb6455b714b817ad60 (patch)
tree15e3374ad054cc9ecbea56a86c1ff0b3f94a3b1c /fs/dlm
parentaca50bd3b4c4bb5528a1878158ba7abce41de534 (diff)
parent53ad1c980d4fb450722a575ca17c188808939340 (diff)
downloadlinux-721b024bd47c1e4b995e7eeb6455b714b817ad60.tar.gz
Merge tag 'dlm-fixes-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
Pull dlm fixes from David Teigland:
 "This includes one short patch fixing the behavior of the QUECVT flag,
  which the gfs2 folks are waiting on."

* tag 'dlm-fixes-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
  dlm: fix QUECVT when convert queue is empty
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lock.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index fa5c07d51dcc..4c58d4a3adc4 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1737,6 +1737,18 @@ static int _can_be_granted(struct dlm_rsb *r, struct dlm_lkb *lkb, int now)
 		return 1;
 
 	/*
+	 * Even if the convert is compat with all granted locks,
+	 * QUECVT forces it behind other locks on the convert queue.
+	 */
+
+	if (now && conv && (lkb->lkb_exflags & DLM_LKF_QUECVT)) {
+		if (list_empty(&r->res_convertqueue))
+			return 1;
+		else
+			goto out;
+	}
+
+	/*
 	 * The NOORDER flag is set to avoid the standard vms rules on grant
 	 * order.
 	 */