summaryrefslogtreecommitdiff
path: root/fs/dlm/lock.h
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2024-04-15 21:39:40 +0300
committerDavid Teigland <teigland@redhat.com>2024-04-16 22:34:39 +0300
commit6644925abf056030cd9efc73fc05ea5a5df4f59f (patch)
tree5eb323cb2875a5257a6bec601ca7fa022ba9d5c1 /fs/dlm/lock.h
parent6c648035cbe75d78836f6d7d2fdd9d996048a66b (diff)
downloadlinux-6644925abf056030cd9efc73fc05ea5a5df4f59f.tar.xz
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>
Diffstat (limited to 'fs/dlm/lock.h')
-rw-r--r--fs/dlm/lock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/lock.h b/fs/dlm/lock.h
index 33616d4b0cdb..b56a34802762 100644
--- a/fs/dlm/lock.h
+++ b/fs/dlm/lock.h
@@ -18,6 +18,7 @@ void dlm_receive_message_saved(struct dlm_ls *ls, const struct dlm_message *ms,
uint32_t saved_seq);
void dlm_receive_buffer(const union dlm_packet *p, int nodeid);
int dlm_modes_compat(int mode1, int mode2);
+void free_toss_rsb(struct dlm_rsb *r);
void dlm_put_rsb(struct dlm_rsb *r);
void dlm_hold_rsb(struct dlm_rsb *r);
int dlm_put_lkb(struct dlm_lkb *lkb);