mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08:00
f2fs: simplify list initialization in f2fs_recover_fsync_data()
In f2fs_recover_fsync_data(),use LIST_HEAD() to declare and initialize the list_head in one step instead of using INIT_LIST_HEAD() separately. No functional change. Signed-off-by: Baolin Liu <liubaolin@kylinos.cn> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -872,8 +872,9 @@ next:
|
||||
|
||||
int f2fs_recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only)
|
||||
{
|
||||
struct list_head inode_list, tmp_inode_list;
|
||||
struct list_head dir_list;
|
||||
LIST_HEAD(inode_list);
|
||||
LIST_HEAD(tmp_inode_list);
|
||||
LIST_HEAD(dir_list);
|
||||
int err;
|
||||
int ret = 0;
|
||||
unsigned long s_flags = sbi->sb->s_flags;
|
||||
@@ -886,10 +887,6 @@ int f2fs_recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only)
|
||||
if (is_sbi_flag_set(sbi, SBI_IS_WRITABLE))
|
||||
f2fs_info(sbi, "recover fsync data on readonly fs");
|
||||
|
||||
INIT_LIST_HEAD(&inode_list);
|
||||
INIT_LIST_HEAD(&tmp_inode_list);
|
||||
INIT_LIST_HEAD(&dir_list);
|
||||
|
||||
/* prevent checkpoint */
|
||||
f2fs_down_write(&sbi->cp_global_sem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user