Skip to content

Commit a367230

Browse files
Alexander Aringteigland
authored andcommitted
dlm: fix error if active rsb is not hashed
If an active rsb is not hashed anymore and this could occur because we releases and acquired locks we need to signal the followed code that the lookup failed. Since the lookup was successful, but it isn't part of the rsb hash anymore we need to signal it by setting error to -EBADR as dlm_search_rsb_tree() does it. Cc: [email protected] Fixes: 5be323b ("dlm: move dlm_search_rsb_tree() out of lock") Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent 94e6e88 commit a367230

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/dlm/lock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ static int find_rsb_dir(struct dlm_ls *ls, const void *name, int len,
741741
read_lock_bh(&ls->ls_rsbtbl_lock);
742742
if (!rsb_flag(r, RSB_HASHED)) {
743743
read_unlock_bh(&ls->ls_rsbtbl_lock);
744+
error = -EBADR;
744745
goto do_new;
745746
}
746747

0 commit comments

Comments
 (0)