From: Wengang Wang Date: Wed, 8 Dec 2010 12:34:39 +0000 (+0800) Subject: ocfs2/dlm: make existing convertion precedent over new lock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66f4500573fe5a1b455e5f7b30068a623a94117f;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Joel Becker --- diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index 69cf369961c..7009292aac5 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;