Skip to content

Commit

Permalink
Revert "f2fs: should check the type of end_io after pullback by fscry…
Browse files Browse the repository at this point in the history
…pto"

This reverts commit 4a8c4ca.

Signed-off-by: khusika <khusikadhamar@gmail.com>
  • Loading branch information
khusika committed Oct 13, 2018
1 parent b338b24 commit 6e50e47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ static void f2fs_write_end_io(struct bio *bio, int err)

bio_for_each_segment_all(bvec, bio, i) {
struct page *page = bvec->bv_page;
enum count_type type = WB_DATA_TYPE(page);

if (IS_DUMMY_WRITTEN_PAGE(page)) {
set_page_private(page, (unsigned long)NULL);
Expand All @@ -169,14 +170,14 @@ static void f2fs_write_end_io(struct bio *bio, int err)

if (unlikely(err)) {
set_bit(AS_EIO, &page->mapping->flags);
if (WB_DATA_TYPE(page) == F2FS_WB_CP_DATA)
if (type == F2FS_WB_CP_DATA)
f2fs_stop_checkpoint(sbi, true);
}

f2fs_bug_on(sbi, page->mapping == NODE_MAPPING(sbi) &&
page->index != nid_of_node(page));

dec_page_count(sbi, WB_DATA_TYPE(page));
dec_page_count(sbi, type);
clear_cold_data(page);
end_page_writeback(page);
}
Expand Down

0 comments on commit 6e50e47

Please sign in to comment.