On Tue, Mar 12, 2024 at 01:05:08PM -0400, Alexander Aring wrote:
There was a wrong conversion to atomic counters in commit 75a7d60134ce ("fs: dlm: handle lkb wait count as atomic_t"), when atomic_dec_and_test() returns true it will decrement at first and then return true if it hits zero. This means we will mis a unhold_lkb() for the last iteration. This patch fixes this issue and if the last reference is taken we will remove the lkb from the waiters list as this is how it's supposed to work.
Cc: stable@vger.kernel.org Fixes: 75a7d60134ce ("fs: dlm: handle lkb wait count as atomic_t") Signed-off-by: Alexander Aring aahringo@redhat.com
Tested-by: Valentin Vidić vvidic@valentin-vidic.from.hr