Skip to contentSkip to conversation

ocfs2/dlm: remove unused function

PATCH Applied Jiapeng Chong 3 participants 3 messages Apr 14, 2021 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2/dlm: remove unused function

Fix the following clang warning:

fs/ocfs2/dlm/dlmrecovery.c:129:20: warning: unused function 'dlm_reset_recovery' [-Wunused-function].

---
 fs/ocfs2/dlm/dlmrecovery.c | 7 -------
 1 file changed, 7 deletions(-)
fs/ocfs2/dlm/dlmrecovery.c +0 -7
index 4b566e8..afc5173 100644
@@ -126,13 +126,6 @@ static inline void __dlm_reset_recovery(struct dlm_ctxt *dlm)
 	dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM);
 }
 
-static inline void dlm_reset_recovery(struct dlm_ctxt *dlm)
-{
-	spin_lock(&dlm->spinlock);
-	__dlm_reset_recovery(dlm);
-	spin_unlock(&dlm->spinlock);
-}
-
 /* Worker function used during recovery. */
 void dlm_dispatch_work(struct work_struct *work)
 {
Signature · 1 line
1.8.3.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jiapeng Chong

Fix the following clang warning:

fs/ocfs2/dlm/dlmrecovery.c:129:20: warning: unused function 'dlm_reset_recovery' [-Wunused-function].

Seems after commit ded2cf71419b ("ocfs2: dlm: fix recovery hung"), dlm_reset_recovery() no longer has any user.

Quoted 13 lines
---
 fs/ocfs2/dlm/dlmrecovery.c | 7 -------
 1 file changed, 7 deletions(-)
fs/ocfs2/dlm/dlmrecovery.c +0 -0
index 4b566e8..afc5173 100644
@@ -126,13 +126,6 @@ static inline void __dlm_reset_recovery(struct dlm_ctxt *dlm)
 	dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM);
 }
 

fs/ocfs2/dlm/dlmrecovery.c static inline void __dlm_reset_recovery(struct dlm_ctxt *dlm) · line 131

Quoted 10 lines
fs/ocfs2/dlm/dlmrecovery.c +0 -7
-static inline void dlm_reset_recovery(struct dlm_ctxt *dlm)
-{
-	spin_lock(&dlm->spinlock);
-	__dlm_reset_recovery(dlm);
-	spin_unlock(&dlm->spinlock);
-}
-
 /* Worker function used during recovery. */
 void dlm_dispatch_work(struct work_struct *work)
 {

_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Jiapeng Chong

On Apr 13, 2021, at 11:46 PM, Jiapeng Chong <[email protected]<mailto:[email protected]>> wrote:

Fix the following clang warning:

fs/ocfs2/dlm/dlmrecovery.c:129:20: warning: unused function 'dlm_reset_recovery' [-Wunused-function].

---
fs/ocfs2/dlm/dlmrecovery.c | 7 -------

1 file changed, 7 deletions(-)
fs/ocfs2/dlm/dlmrecovery.c +0 -0
index 4b566e8..afc5173 100644
@@ -126,13 +126,6 @@ static inline void __dlm_reset_recovery(struct dlm_ctxt *dlm)

dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM);
}

-static inline void dlm_reset_recovery(struct dlm_ctxt *dlm) -{
- spin_lock(&dlm->spinlock);
- __dlm_reset_recovery(dlm);
- spin_unlock(&dlm->spinlock);
-}
-
/* Worker function used during recovery. */
void dlm_dispatch_work(struct work_struct *work)
{
--
1.8.3.1

_______________________________________________
Ocfs2-devel mailing list [email protected]<mailto:[email protected]>
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel