summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-24 21:22:44 +0800
committerTheodore Ts'o <tytso@mit.edu>2021-02-02 23:16:01 -0500
commit59ebc7fd74506367b109497eeef36034e648c943 (patch)
tree4e1f1e5a0b3be63e9f88739271678fe8353013a6 /fs/ext4
parent1048ba83fb1c00cd24172e23e8263972f6b5d9ac (diff)
ext4: use DEFINE_MUTEX() for mutex lock
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Link: https://lore.kernel.org/r/20201224132244.30907-1-zhengyongjun3@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9a6f9875aa34..f361f9fb40d1 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 *,
@@ -6667,7 +6667,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();