]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dlm: fix error if inactive rsb is not hashed
authorAlexander Aring <aahringo@redhat.com>
Fri, 28 Feb 2025 22:48:50 +0000 (17:48 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:18:20 +0000 (10:18 +0200)
commitae121fec869efbc86cbc7d13d27ad9cf984b88a5
treee035aba7fbae5f114682050c2a1e505998d746e4
parent4570fc64f9094b09296817715b744388c66bbb86
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>
fs/dlm/lock.c