All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH -next] dlm: use DEFINE_SPINLOCK() for spinlock
@ 2021-03-30  2:00 zhongbaisong
  0 siblings, 0 replies; 2+ messages in thread
From: zhongbaisong @ 2021-03-30  2:00 UTC (permalink / raw)
  To: cluster-devel.redhat.com

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baisong Zhong <zhongbaisong@huawei.com>
---
  fs/dlm/lockspace.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index c14cf2b7faab..5bc19cdad34d 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -28,7 +28,7 @@
  static int			ls_count;
  static struct mutex		ls_lock;
  static struct list_head		lslist;
-static spinlock_t		lslist_lock;
+static DEFINE_SPINLOCK(lslist_lock);
  static struct task_struct *	scand_task;
  
  
@@ -233,7 +233,6 @@ int __init dlm_lockspace_init(void)
  	ls_count = 0;
  	mutex_init(&ls_lock);
  	INIT_LIST_HEAD(&lslist);
-	spin_lock_init(&lslist_lock);
  
  	dlm_kset = kset_create_and_add("dlm", &dlm_uevent_ops, kernel_kobj);
  	if (!dlm_kset) {



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20210330/9ed3c14f/attachment.htm>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH -next] dlm: use DEFINE_SPINLOCK() for spinlock
@ 2021-04-06 11:54 Huang Guobin
  0 siblings, 0 replies; 2+ messages in thread
From: Huang Guobin @ 2021-04-06 11:54 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Guobin Huang <huangguobin4@huawei.com>

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
---
 fs/dlm/plock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index c38b2b8ffd1d..5a24a2271fdd 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -13,7 +13,7 @@
 #include "dlm_internal.h"
 #include "lockspace.h"
 
-static spinlock_t ops_lock;
+static DEFINE_SPINLOCK(ops_lock);
 static struct list_head send_list;
 static struct list_head recv_list;
 static wait_queue_head_t send_wq;
@@ -492,7 +492,6 @@ int dlm_plock_init(void)
 {
 	int rv;
 
-	spin_lock_init(&ops_lock);
 	INIT_LIST_HEAD(&send_list);
 	INIT_LIST_HEAD(&recv_list);
 	init_waitqueue_head(&send_wq);



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-06 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  2:00 [Cluster-devel] [PATCH -next] dlm: use DEFINE_SPINLOCK() for spinlock zhongbaisong
2021-04-06 11:54 Huang Guobin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.