diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-07-07 08:05:06 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-07-07 08:05:06 +0300 |
commit | 28607bf3aa6f9762b32dc7f1ed0488823c0651b8 (patch) | |
tree | c3cf8900cb380bfdc8f84e318ee0d0c8b1d102a0 /fs/f2fs | |
parent | c9ebd3df43c067b57203737484076345b6df2fb4 (diff) | |
download | linux-28607bf3aa6f9762b32dc7f1ed0488823c0651b8.tar.xz |
f2fs: drop dirty node pages when cp is in error status
Otherwise, writeback is going to fall in a loop to flush dirty inode forever
before getting SBI_CLOSING.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/node.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index dd611efa8aa4..0be9e2d7120e 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1549,13 +1549,10 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, trace_f2fs_writepage(page, NODE); if (unlikely(f2fs_cp_error(sbi))) { - if (is_sbi_flag_set(sbi, SBI_IS_CLOSE)) { - ClearPageUptodate(page); - dec_page_count(sbi, F2FS_DIRTY_NODES); - unlock_page(page); - return 0; - } - goto redirty_out; + ClearPageUptodate(page); + dec_page_count(sbi, F2FS_DIRTY_NODES); + unlock_page(page); + return 0; } if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING))) |