Skip to content

Commit 67e4d8c

Browse files
Alexander Aringteigland
Alexander Aring
authored andcommitted
dlm: fix missing check in validate_lock_args
This patch adds a additional check if lkb->lkb_wait_count is non zero as it is done in validate_unlock_args() to check if any operation is in progress. While on it add a comment taken from validate_unlock_args() to signal what the check is doing. There might be no changes because if lkb->lkb_wait_type is non zero implies that lkb->lkb_wait_count is non zero. However we should add the check as it does validate_unlock_args(). Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent 1f4f108 commit 67e4d8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/dlm/lock.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,8 @@ static int validate_lock_args(struct dlm_ls *ls, struct dlm_lkb *lkb,
29122912
if (lkb->lkb_status != DLM_LKSTS_GRANTED)
29132913
goto out;
29142914

2915-
if (lkb->lkb_wait_type)
2915+
/* lock not allowed if there's any op in progress */
2916+
if (lkb->lkb_wait_type || lkb->lkb_wait_count)
29162917
goto out;
29172918

29182919
if (is_overlap(lkb))

0 commit comments

Comments
 (0)