Skip to contentSkip to conversation

dlm: use DEFINE_MUTEX (and mutex_init() had been too late)

PATCH New Zheng Yongjun 1 participant 1 message Dec 23, 2020 Distributed lock manager (DLM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dlm: use DEFINE_MUTEX (and mutex_init() had been too late)

---
 fs/dlm/lockspace.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/dlm/lockspace.c +1 -2
index 624617c12250..2b3c32f2d29d 100644
@@ -26,7 +26,7 @@
 #include "ast.h"
 
 static int			ls_count;
-static struct mutex		ls_lock;
+static DEFINE_MUTEX(ls_lock);
 static struct list_head		lslist;
 static spinlock_t		lslist_lock;
 static struct task_struct *	scand_task;
@@ -231,7 +231,6 @@ static const struct kset_uevent_ops dlm_uevent_ops = {
 int __init dlm_lockspace_init(void)
 {
 	ls_count = 0;
-	mutex_init(&ls_lock);
 	INIT_LIST_HEAD(&lslist);
 	spin_lock_init(&lslist_lock);
 
Signature · 1 line
2.22.0