mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "weiyongjun (A)" <weiyongjun1@huawei.com>
To: Ye Bin <yebin10@huawei.com>,
	Christine Caulfield <ccaulfie@redhat.com>,
	David Teigland <teigland@redhat.com>
Cc: <cluster-devel@redhat.com>, <linux-kernel@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH -next] dlm: use DEFINE_MUTEX() for mutex lock
Date: Fri, 9 Apr 2021 17:48:20 +0800	[thread overview]
Message-ID: <ea193d44-5416-66ff-6749-5a77a1661901@huawei.com> (raw)
In-Reply-To: <20210409095139.2293922-1-yebin10@huawei.com>

两个标题一样的可以合并

在 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@huawei.com>
> Signed-off-by: Ye Bin <yebin10@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..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);
>   
>

  reply	other threads:[~2021-04-09  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  9:51 Ye Bin
2021-04-09  9:48 ` weiyongjun (A) [this message]
2021-04-09  9:51 Ye Bin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea193d44-5416-66ff-6749-5a77a1661901@huawei.com \
    --to=weiyongjun1@huawei.com \
    --cc=ccaulfie@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=hulkci@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=teigland@redhat.com \
    --cc=yebin10@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®