Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6fcc2be authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "f2fs: relax the f2fs_bug_on() condition in do_checkpoint()"

parents 24f4ae35 54297cd0
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1401,8 +1401,10 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)

	/* Flush all the NAT/SIT pages */
	f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO);
	f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_META) &&
					!f2fs_cp_error(sbi));
	if (get_pages(sbi, F2FS_DIRTY_META) && !f2fs_cp_error(sbi)) {
		WARN_ON(1);
		set_sbi_flag(sbi, SBI_NEED_FSCK);
	}

	/*
	 * modify checkpoint
@@ -1510,8 +1512,10 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)

	/* Here, we have one bio having CP pack except cp pack 2 page */
	f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO);
	f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_META) &&
					!f2fs_cp_error(sbi));
	if (get_pages(sbi, F2FS_DIRTY_META) && !f2fs_cp_error(sbi)) {
		WARN_ON(1);
		set_sbi_flag(sbi, SBI_NEED_FSCK);
	}

	/* wait for previous submitted meta pages writeback */
	f2fs_wait_on_all_pages_writeback(sbi);