summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-05-04 18:04:22 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2018-05-31 11:31:49 -0700
commit868de6135f060b966a9320cc54bf12249b5c0f99 (patch)
tree4fd78220028c21ad4b536c0f4bd69a95e1998a2a /fs/f2fs/node.c
parent4580038e2d11ac7f5e0d6687a6a4e30a71d1b30c (diff)
downloadlinux-stable-868de6135f060b966a9320cc54bf12249b5c0f99.tar.gz
linux-stable-868de6135f060b966a9320cc54bf12249b5c0f99.tar.bz2
linux-stable-868de6135f060b966a9320cc54bf12249b5c0f99.zip
f2fs: don't drop any page on f2fs_cp_error() case
We still provide readdir() after shtudown, so we should keep pages to avoid additional IOs. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 437a66ba56fd..62ce49984a9e 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1376,11 +1376,8 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
trace_f2fs_writepage(page, NODE);
- if (unlikely(f2fs_cp_error(sbi))) {
- dec_page_count(sbi, F2FS_DIRTY_NODES);
- unlock_page(page);
- return 0;
- }
+ if (unlikely(f2fs_cp_error(sbi)))
+ goto redirty_out;
if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
goto redirty_out;