lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ea193d44-5416-66ff-6749-5a77a1661901@huawei.com>
Date:   Fri, 9 Apr 2021 17:48:20 +0800
From:   "weiyongjun (A)" <weiyongjun1@...wei.com>
To:     Ye Bin <yebin10@...wei.com>,
        Christine Caulfield <ccaulfie@...hat.com>,
        David Teigland <teigland@...hat.com>
CC:     <cluster-devel@...hat.com>, <linux-kernel@...r.kernel.org>,
        <kernel-janitors@...r.kernel.org>, Hulk Robot <hulkci@...wei.com>
Subject: Re: [PATCH -next] dlm: use DEFINE_MUTEX() for mutex lock

两个标题一样的可以合并

在 2021/4/9 17:51, Ye Bin 写道:
> mutex lock can be initialized automatically with DEFINE_MUTEX()
> rather than explicitly calling mutex_init().
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Ye Bin <yebin10@...wei.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..fa3ae801aa43 100644
> --- a/fs/dlm/lockspace.c
> +++ b/fs/dlm/lockspace.c
> @@ -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);
>   
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ