summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2024-02-26 09:32:06 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2024-03-04 09:51:52 -0800
commitf1e7646a8cd446c2003c5f98a89880eb987dec72 (patch)
treea4d741c5572dc1e82dd15f60d60b92b7ab69e0cf /fs/f2fs
parent8249aac1b05c28f3b35363b844b5b0194f838052 (diff)
downloadlinux-f1e7646a8cd446c2003c5f98a89880eb987dec72.tar.gz
linux-f1e7646a8cd446c2003c5f98a89880eb987dec72.tar.bz2
linux-f1e7646a8cd446c2003c5f98a89880eb987dec72.zip
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: Chao Yu <chao@kernel.org> Reviewed-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 0c728e82d936..bd8674bf1d84 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -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;