Skip to content

Commit 94e6e88

Browse files
Alexander Aringteigland
authored andcommitted
dlm: fix error if inactive rsb is not hashed
If an inactive 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: 01fdeca ("dlm: use rcu to avoid an extra rsb struct lookup") Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent 8e2bad5 commit 94e6e88

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
@@ -784,6 +784,7 @@ static int find_rsb_dir(struct dlm_ls *ls, const void *name, int len,
784784
}
785785
} else {
786786
write_unlock_bh(&ls->ls_rsbtbl_lock);
787+
error = -EBADR;
787788
goto do_new;
788789
}
789790

0 commit comments

Comments
 (0)