[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201224122921.29343-1-zhengyongjun3@huawei.com>
Date: Thu, 24 Dec 2020 20:29:21 +0800
From: Zheng Yongjun <zhengyongjun3@...wei.com>
To: <cluster-devel@...hat.com>, <linux-kernel@...r.kernel.org>
CC: <ccaulfie@...hat.com>, <teigland@...hat.com>,
Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH v2 -next] dlm: debug_fs: use DEFINE_MUTEX() for mutex lock
mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init()
Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
---
fs/dlm/debug_fs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c
index d6bbccb0ed15..7a6fa8ac6f50 100644
--- a/fs/dlm/debug_fs.c
+++ b/fs/dlm/debug_fs.c
@@ -20,7 +20,7 @@
#define DLM_DEBUG_BUF_LEN 4096
static char debug_buf[DLM_DEBUG_BUF_LEN];
-static struct mutex debug_buf_lock;
+static DEFINE_MUTEX(debug_buf_lock);
static struct dentry *dlm_root;
@@ -794,7 +794,6 @@ void dlm_create_debug_file(struct dlm_ls *ls)
void __init dlm_register_debugfs(void)
{
- mutex_init(&debug_buf_lock);
dlm_root = debugfs_create_dir("dlm", NULL);
}
--
2.22.0
Powered by blists - more mailing lists