Skip to content

Commit

Permalink
ocfs2/dlm: make existing convertion precedent over new lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wengang Wang authored and Joel Becker committed Dec 16, 2010
1 parent 8e17d16 commit 66f4500
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ocfs2/dlm/dlmlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 66f4500

Please sign in to comment.