Commit 59ebc7fd authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Theodore Ts'o
Browse files

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: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201224132244.30907-1-zhengyongjun3@huawei.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 1048ba83
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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();