dlm: fix removal of rsb struct that is master and dir record
authorAlexander Aring <aahringo@redhat.com>
Tue, 19 Nov 2024 20:56:44 +0000 (15:56 -0500)
committerDavid Teigland <teigland@redhat.com>
Thu, 19 Dec 2024 19:07:02 +0000 (13:07 -0600)
commit134129520beaf3339482c557361ea0bde709cf36
treee3a360efd5b72f57e492707d1e7df2a85a3a40d5
parent78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8
dlm: fix removal of rsb struct that is master and dir record

An rsb struct was not being removed in the case where it
was both the master and the dir record.  This case (master
and dir node) was missed in the condition for doing add_scan()
from deactivate_rsb().  Fixing this triggers a related WARN_ON
that needs to be fixed, and requires adjusting where two
del_scan() calls are made.

Fixes: c217adfc8caa ("dlm: fix add_scan and del_scan usage")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c