Skip to content

Commit 28607bf

Browse files
author
Jaegeuk Kim
committed
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>
1 parent c9ebd3d commit 28607bf

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

fs/f2fs/node.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,13 +1549,10 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
15491549
trace_f2fs_writepage(page, NODE);
15501550

15511551
if (unlikely(f2fs_cp_error(sbi))) {
1552-
if (is_sbi_flag_set(sbi, SBI_IS_CLOSE)) {
1553-
ClearPageUptodate(page);
1554-
dec_page_count(sbi, F2FS_DIRTY_NODES);
1555-
unlock_page(page);
1556-
return 0;
1557-
}
1558-
goto redirty_out;
1552+
ClearPageUptodate(page);
1553+
dec_page_count(sbi, F2FS_DIRTY_NODES);
1554+
unlock_page(page);
1555+
return 0;
15591556
}
15601557

15611558
if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))

0 commit comments

Comments
 (0)