Skip to content

Commit

Permalink
ext4: use DEFINE_MUTEX() for mutex lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zheng Yongjun authored and Theodore Ts'o committed Feb 3, 2021
1 parent 1048ba8 commit 59ebc7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *,
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 59ebc7f

Please sign in to comment.