* [PATCH v2 -next] ext4: use DEFINE_MUTEX() for mutex lock
@ 2020-12-24 13:22 Zheng Yongjun
2021-02-03 4:17 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-24 13:22 UTC (permalink / raw)
To: tytso, adilger.kernel, linux-ext4, linux-kernel; +Cc: Zheng Yongjun
mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
fs/ext4/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 94472044f4c1..8776f06a639d 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -59,7 +59,7 @@
#include <trace/events/ext4.h>
static struct ext4_lazy_init *ext4_li_info;
-static struct mutex ext4_li_mtx;
+static DEFINE_MUTEX(ext4_li_mtx);
static struct ratelimit_state ext4_mount_msg_ratelimit;
static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
@@ -6640,7 +6640,6 @@ static int __init ext4_init_fs(void)
ratelimit_state_init(&ext4_mount_msg_ratelimit, 30 * HZ, 64);
ext4_li_info = NULL;
- mutex_init(&ext4_li_mtx);
/* Build-time check for flags consistency */
ext4_check_flag_values();
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 -next] ext4: use DEFINE_MUTEX() for mutex lock
2020-12-24 13:22 [PATCH v2 -next] ext4: use DEFINE_MUTEX() for mutex lock Zheng Yongjun
@ 2021-02-03 4:17 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2021-02-03 4:17 UTC (permalink / raw)
To: Zheng Yongjun; +Cc: adilger.kernel, linux-ext4, linux-kernel
On Thu, Dec 24, 2020 at 09:22:44PM +0800, 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>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-03 4:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24 13:22 [PATCH v2 -next] ext4: use DEFINE_MUTEX() for mutex lock Zheng Yongjun
2021-02-03 4:17 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).