summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-06-29 17:20:45 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2017-07-07 19:34:44 +0200
commit0771fcc71c0c28bf31ac5c2c863b9f0de0fdf00d (patch)
tree249a29fd536d6bc646e51f99b77340add6eb898b /fs/f2fs/node.c
parentf2fs: introduce __check_sit_bitmap (diff)
downloadlinux-0771fcc71c0c28bf31ac5c2c863b9f0de0fdf00d.tar.xz
linux-0771fcc71c0c28bf31ac5c2c863b9f0de0fdf00d.zip
f2fs: skip ->writepages for {mete,node}_inode during recovery
Skip ->writepages in prior to ->writepage for {meta,node}_inode during recovery, hence unneeded loop in ->writepages can be avoided. Moreover, check SBI_POR_DOING earlier while writebacking pages. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index f6f46be139f4..fd57ffd88508 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1687,6 +1687,9 @@ static int f2fs_write_node_pages(struct address_space *mapping,
struct blk_plug plug;
long diff;
+ if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
+ goto skip_write;
+
/* balancing f2fs's metadata in background */
f2fs_balance_fs_bg(sbi);