Commit 139211c6 authored by Chao Yu's avatar Chao Yu Committed by Greg Kroah-Hartman

f2fs: clean up argument of recover_data

commit b7973f23 upstream.

In recover_data, value of argument 'type' will be CURSEG_WARM_NODE all
the time, remove it for cleanup.
Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
[bwh: Picked as dependency of commit 6781eabb "f2fs: give -EINVAL for
 norecovery and rw mount"]
Signed-off-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 693ae291
...@@ -459,8 +459,7 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, ...@@ -459,8 +459,7 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
return err; return err;
} }
static int recover_data(struct f2fs_sb_info *sbi, static int recover_data(struct f2fs_sb_info *sbi, struct list_head *head)
struct list_head *head, int type)
{ {
unsigned long long cp_ver = cur_cp_version(F2FS_CKPT(sbi)); unsigned long long cp_ver = cur_cp_version(F2FS_CKPT(sbi));
struct curseg_info *curseg; struct curseg_info *curseg;
...@@ -469,7 +468,7 @@ static int recover_data(struct f2fs_sb_info *sbi, ...@@ -469,7 +468,7 @@ static int recover_data(struct f2fs_sb_info *sbi,
block_t blkaddr; block_t blkaddr;
/* get node pages in the current segment */ /* get node pages in the current segment */
curseg = CURSEG_I(sbi, type); curseg = CURSEG_I(sbi, CURSEG_WARM_NODE);
blkaddr = NEXT_FREE_BLKADDR(sbi, curseg); blkaddr = NEXT_FREE_BLKADDR(sbi, curseg);
while (1) { while (1) {
...@@ -556,7 +555,7 @@ int recover_fsync_data(struct f2fs_sb_info *sbi) ...@@ -556,7 +555,7 @@ int recover_fsync_data(struct f2fs_sb_info *sbi)
need_writecp = true; need_writecp = true;
/* step #2: recover data */ /* step #2: recover data */
err = recover_data(sbi, &inode_list, CURSEG_WARM_NODE); err = recover_data(sbi, &inode_list);
if (!err) if (!err)
f2fs_bug_on(sbi, !list_empty(&inode_list)); f2fs_bug_on(sbi, !list_empty(&inode_list));
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment