mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
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>
This commit is contained in:
parent
1048ba83fb
commit
59ebc7fd74
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user