dlm: use DEFINE_MUTEX() for mutex lock
Subsystems (2)
PATCH 1/1 dlm: use DEFINE_MUTEX() for mutex lock
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init().
Reported-by Hulk Robot <[email protected]>
Signed-off-by Ye Bin <[email protected]>
--- fs/dlm/debug_fs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/dlm/debug_fs.c +1 -2
@@ -20,7 +20,7 @@#define DLM_DEBUG_BUF_LEN 4096static char debug_buf[DLM_DEBUG_BUF_LEN ]; -static struct mutex debug_buf_lock; +static DEFINE_MUTEX (debug_buf_lock);static struct dentry *dlm_root;
@@ -795,7 +795,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 ); }