Commit f1e7646a authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: relocate f2fs_precache_extents() in f2fs_swap_activate()

This patch exchangs position of f2fs_precache_extents() and
filemap_fdatawrite(), so that f2fs_precache_extents() can load
extent info after physical addresses of all data are fixed.
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Reviewed-by: default avatarDaeho Jeong <daehojeong@google.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 8249aac1
......@@ -4045,12 +4045,12 @@ static int f2fs_swap_activate(struct swap_info_struct *sis, struct file *file,
if (!f2fs_disable_compressed_file(inode))
return -EINVAL;
f2fs_precache_extents(inode);
ret = filemap_fdatawrite(inode->i_mapping);
if (ret < 0)
return ret;
f2fs_precache_extents(inode);
ret = check_swap_activate(sis, file, span);
if (ret < 0)
return ret;
......
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