dlm: do not use ref counts for rsb in the toss state
authorAlexander Aring <aahringo@redhat.com>
Mon, 15 Apr 2024 18:39:40 +0000 (14:39 -0400)
committerDavid Teigland <teigland@redhat.com>
Tue, 16 Apr 2024 19:34:39 +0000 (14:34 -0500)
commit6644925abf056030cd9efc73fc05ea5a5df4f59f
tree5eb323cb2875a5257a6bec601ca7fa022ba9d5c1
parent6c648035cbe75d78836f6d7d2fdd9d996048a66b
dlm: do not use ref counts for rsb in the toss state

In the past we had problems when an rsb had a reference counter greater
than one while in the toss state.  An rsb in the toss state is not
actively used for locking, and should not have any other references
apart from the single ref keeping it on the rsb hash.  Shift to freeing
rsb's directly rather than using kref_put to free them, since the ref
counting is not meant to be used in this state.  Add warnings if ref
counting is seen while an rsb is in the toss state.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c
fs/dlm/lock.h
fs/dlm/recover.c