diff options
| author | Baolin Liu <liubaolin@kylinos.cn> | 2025-11-11 20:17:28 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-12-04 02:00:04 +0000 |
| commit | 24fd7f00161055e1ca0dd137a1d67f87fa781f99 (patch) | |
| tree | 02f317e09a55704850095aa828e98e898eaf61ea /fs | |
| parent | 7ee8bc3942f20964ad730871b885688ea3a2961a (diff) | |
| download | tip-24fd7f00161055e1ca0dd137a1d67f87fa781f99.tar.gz | |
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>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/f2fs/recovery.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 62a0c71b5b75d6..c3415ebb9f5053 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -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); |
