From: Tyler Hicks <code@tyhicks.com>
To: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: ecryptfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 -next] ecryptfs: use DEFINE_MUTEX() for mutex lock
Date: Sat, 30 Jan 2021 11:57:51 -0600 [thread overview]
Message-ID: <20210130175751.GC58096@elm> (raw)
In-Reply-To: <20201224132233.30852-1-zhengyongjun3@huawei.com>
On 2020-12-24 21:22:33, Zheng Yongjun wrote:
> mutex lock can be initialized automatically with DEFINE_MUTEX()
> rather than explicitly calling mutex_init().
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
This looks good to me. I've pushed the patch to the eCryptfs next
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git/log/?h=next
Thanks for the cleanup!
Tyler
> ---
> fs/ecryptfs/crypto.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
> index 0681540c48d9..be906b9bbb11 100644
> --- a/fs/ecryptfs/crypto.c
> +++ b/fs/ecryptfs/crypto.c
> @@ -1590,11 +1590,10 @@ ecryptfs_process_key_cipher(struct crypto_skcipher **key_tfm,
>
> struct kmem_cache *ecryptfs_key_tfm_cache;
> static struct list_head key_tfm_list;
> -struct mutex key_tfm_list_mutex;
> +DEFINE_MUTEX(key_tfm_list_mutex);
>
> int __init ecryptfs_init_crypto(void)
> {
> - mutex_init(&key_tfm_list_mutex);
> INIT_LIST_HEAD(&key_tfm_list);
> return 0;
> }
> --
> 2.22.0
>
prev parent reply other threads:[~2021-01-30 17:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-24 13:22 [PATCH v2 -next] ecryptfs: use DEFINE_MUTEX() for mutex lock Zheng Yongjun
2020-12-24 13:22 ` Zheng Yongjun
2021-01-30 17:57 ` Tyler Hicks [this message]
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=20210130175751.GC58096@elm \
--to=code@tyhicks.com \
--cc=ecryptfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhengyongjun3@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 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.