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>pull/1354/merge
parent
7ee8bc3942
commit
24fd7f0016
|
|
@ -872,8 +872,9 @@ next:
|
||||||
|
|
||||||
int f2fs_recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only)
|
int f2fs_recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only)
|
||||||
{
|
{
|
||||||
struct list_head inode_list, tmp_inode_list;
|
LIST_HEAD(inode_list);
|
||||||
struct list_head dir_list;
|
LIST_HEAD(tmp_inode_list);
|
||||||
|
LIST_HEAD(dir_list);
|
||||||
int err;
|
int err;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned long s_flags = sbi->sb->s_flags;
|
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))
|
if (is_sbi_flag_set(sbi, SBI_IS_WRITABLE))
|
||||||
f2fs_info(sbi, "recover fsync data on readonly fs");
|
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 */
|
/* prevent checkpoint */
|
||||||
f2fs_down_write(&sbi->cp_global_sem);
|
f2fs_down_write(&sbi->cp_global_sem);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue