[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250906125451.19206-1-alessio.attilio.dev@gmail.com>
Date: Sat, 6 Sep 2025 14:54:51 +0200
From: Alessio Attilio <alessio.attilio.dev@...il.com>
To: alessio.attilio.dev@...il.com
Cc: aahringo@...hat.com,
gfs2@...ts.linux.dev,
linux-kernel@...r.kernel.org,
teigland@...hat.com
Subject: [PATCH] fix: delete del_proc_lock
The del_proc_lock function was originally retained for testing purposes during development of the Distributed Lock Manager (DLM).
With testing now complete and the function no longer serving a runtime role, it is safe to remove.
Reason for Removal: The function is unused in production code and was only kept temporarily for debugging and validation.
Its presence is no longer necessary and may cause confusion or clutter.
Impact: This change simplifies the codebase and improves maintainability without affecting functionality or stability.
Signed-off-by: Alessio Attilio <alessio.attilio.dev@...il.com>
---
fs/dlm/lock.c | 30 ++----------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 9d74b78d3544..9170b5c09823 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -6146,35 +6146,9 @@ static int unlock_proc_lock(struct dlm_ls *ls, struct dlm_lkb *lkb)
return error;
}
-/* We have to release clear_proc_locks mutex before calling unlock_proc_lock()
- (which does lock_rsb) due to deadlock with receiving a message that does
- lock_rsb followed by dlm_user_add_cb() */
-
-static struct dlm_lkb *del_proc_lock(struct dlm_ls *ls,
- struct dlm_user_proc *proc)
+static void clean_proc_locks(struct dlm_ls *ls, struct dlm_user_proc *proc)
{
- struct dlm_lkb *lkb = NULL;
-
- spin_lock_bh(&ls->ls_clear_proc_locks);
- if (list_empty(&proc->locks))
- goto out;
-
- lkb = list_entry(proc->locks.next, struct dlm_lkb, lkb_ownqueue);
- list_del_init(&lkb->lkb_ownqueue);
-
- if (lkb->lkb_exflags & DLM_LKF_PERSISTENT)
- set_bit(DLM_DFL_ORPHAN_BIT, &lkb->lkb_dflags);
- else
- set_bit(DLM_IFL_DEAD_BIT, &lkb->lkb_iflags);
- out:
- spin_unlock_bh(&ls->ls_clear_proc_locks);
- return lkb;
-}
-
-void dlm_clear_proc_locks(struct dlm_ls *ls, struct dlm_user_proc *proc)
-{
- struct dlm_callback *cb, *cb_safe;
- struct dlm_lkb *lkb, *safe;
+ struct dlm_lkb *lkb;
dlm_lock_recovery(ls);
--
2.48.1
Powered by blists - more mailing lists