diff mbox series

ocfs2/dlm: remove unused function

Message ID 1618382761-5784-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New
Headers show
Series ocfs2/dlm: remove unused function | expand

Commit Message

Jiapeng Chong April 14, 2021, 6:46 a.m. UTC
Fix the following clang warning:

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

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 fs/ocfs2/dlm/dlmrecovery.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Joseph Qi April 14, 2021, 11:44 a.m. UTC | #1
On 4/14/21 2:46 PM, Jiapeng Chong wrote:
> Fix the following clang warning:
> 
> fs/ocfs2/dlm/dlmrecovery.c:129:20: warning: unused function
> 'dlm_reset_recovery' [-Wunused-function].
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

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

Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>

> ---
>  fs/ocfs2/dlm/dlmrecovery.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
> index 4b566e8..afc5173 100644
> --- a/fs/ocfs2/dlm/dlmrecovery.c
> +++ b/fs/ocfs2/dlm/dlmrecovery.c
> @@ -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)
>  {
>
Wengang Wang April 14, 2021, 3:22 p.m. UTC | #2
Reviewed-by: Wengang Wang <wen.gang.wang@oracle.com<mailto:wen.gang.wang@oracle.com>>


On Apr 13, 2021, at 11:46 PM, Jiapeng Chong <jiapeng.chong@linux.alibaba.com<mailto:jiapeng.chong@linux.alibaba.com>> wrote:

Fix the following clang warning:

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

Reported-by: Abaci Robot <abaci@linux.alibaba.com<mailto:abaci@linux.alibaba.com>>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com<mailto:jiapeng.chong@linux.alibaba.com>>
---
fs/ocfs2/dlm/dlmrecovery.c | 7 -------
1 file changed, 7 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 4b566e8..afc5173 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -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
diff mbox series

Patch

diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 4b566e8..afc5173 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -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)
 {