浏览代码

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>
Wengang Wang 14 年之前
父节点
当前提交
66f4500573
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      fs/ocfs2/dlm/dlmlock.c

+ 3 - 0
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;