dlm: use DEFINE_SPINLOCK() for spinlock
PATCH 1/1 dlm: use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init().
Reported-by Hulk Robot <[email protected]>
Signed-off-by Baisong Zhong <[email protected]>
--- fs/dlm/lockspace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/dlm/lockspace.c +1 -2
@@ -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>