aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorWengang Wang <wen.gang.wang@oracle.com>2010-12-08 20:34:39 +0800
committerJoel Becker <joel.becker@oracle.com>2010-12-16 00:46:08 -0800
commit66f4500573fe5a1b455e5f7b30068a623a94117f (patch)
tree7932999ac32f253a83c061585ca2faa73edeb662 /fs/ocfs2
parent8e17d16f401f7c60908726e070bfa5cbdf31e2f3 (diff)
downloadkernel_samsung_aries-66f4500573fe5a1b455e5f7b30068a623a94117f.zip
kernel_samsung_aries-66f4500573fe5a1b455e5f7b30068a623a94117f.tar.gz
kernel_samsung_aries-66f4500573fe5a1b455e5f7b30068a623a94117f.tar.bz2
ocfs2/dlm: make existing convertion precedent over new lock
Make existing convertion precedent over new lock. It makes o2dlm locking more like fair locking. Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dlm/dlmlock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c
index 69cf369..7009292 100644
--- a/fs/ocfs2/dlm/dlmlock.c
+++ b/fs/ocfs2/dlm/dlmlock.c
@@ -106,6 +106,9 @@ static int dlm_can_grant_new_lock(struct dlm_lock_resource *res,
if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type))
return 0;
+ if (!dlm_lock_compatible(tmplock->ml.convert_type,
+ lock->ml.type))
+ return 0;
}
return 1;