summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2025-02-28 17:48:50 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-20 10:15:52 +0200
commitb77f8a17ef6f5b578ab6c83ca02d0d07505b93d5 (patch)
tree2f6f88de81fd5eb83854f4122e1da9f357c38d8a
parenteaa7014aecb5e46ff94c3c8395b57f78bcf22baf (diff)
dlm: fix error if inactive rsb is not hashed
commit 94e6e889a786dd16542fc8f2a45405fa13e3bbb5 upstream. 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: stable@vger.kernel.org Fixes: 01fdeca1cc2d ("dlm: use rcu to avoid an extra rsb struct lookup") Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/dlm/lock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 0c01e4423ee2..baaeaa85a7f4 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -784,6 +784,7 @@ static int find_rsb_dir(struct dlm_ls *ls, const void *name, int len,
}
} else {
write_unlock_bh(&ls->ls_rsbtbl_lock);
+ error = -EBADR;
goto do_new;
}