diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-05-28 19:15:35 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-06-02 09:52:07 -0700 |
commit | 528e34593d6eff11a289ef23452c66175a340f0b (patch) | |
tree | ee116eb15e84ee2837207649a484c999d7a2c66f /fs/f2fs/recovery.c | |
parent | 96c6dd59bf1d8b30afd3681550b321f4183e1914 (diff) | |
download | linux-528e34593d6eff11a289ef23452c66175a340f0b.tar.gz linux-528e34593d6eff11a289ef23452c66175a340f0b.tar.bz2 linux-528e34593d6eff11a289ef23452c66175a340f0b.zip |
f2fs: hide common code in f2fs_replace_block
This patch clean up codes through:
1.rename f2fs_replace_block to __f2fs_replace_block().
2.introduce new f2fs_replace_block() to include __f2fs_replace_block()
and some common related codes around __f2fs_replace_block().
Then, newly introduced function f2fs_replace_block can be used by
following patch.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r-- | fs/f2fs/recovery.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 9de25878db2b..24a8c1d4f45f 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -360,7 +360,6 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, struct f2fs_inode_info *fi = F2FS_I(inode); unsigned int start, end; struct dnode_of_data dn; - struct f2fs_summary sum; struct node_info ni; int err = 0, recovered = 0; @@ -420,13 +419,9 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, if (err) goto err; - set_summary(&sum, dn.nid, dn.ofs_in_node, ni.version); - /* write dummy data page */ - f2fs_replace_block(sbi, &sum, src, dest, false); - dn.data_blkaddr = dest; - set_data_blkaddr(&dn); - f2fs_update_extent_cache(&dn); + f2fs_replace_block(sbi, &dn, src, dest, + ni.version, false); recovered++; } dn.ofs_in_node++; |