From: zhongbaisong Date: Tue, 30 Mar 2021 10:00:09 +0800 Subject: [Cluster-devel] [PATCH -next] dlm: use DEFINE_SPINLOCK() for spinlock Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Baisong Zhong --- 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: