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

Commit 3beda2c4 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: fix to set sbi dirty correctly



In order to record direct IO count, we add two additional type in
enum count_type: F2FS_DIO_{WRITE,READ}, but those IO won't dirty
filesystem metadata, so we don't need to set filesystem dirty in
inc_page_count(), fix it.

Fixes: 02b16d0a34a1 ("f2fs: add to account direct IO")
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 1a684b23
Loading
Loading
Loading
Loading
+6 −7
Original line number Original line Diff line number Diff line
@@ -1799,12 +1799,11 @@ static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type)
{
{
	atomic_inc(&sbi->nr_pages[count_type]);
	atomic_inc(&sbi->nr_pages[count_type]);


	if (count_type == F2FS_DIRTY_DATA || count_type == F2FS_INMEM_PAGES ||
	if (count_type == F2FS_DIRTY_DENTS ||
		count_type == F2FS_WB_CP_DATA || count_type == F2FS_WB_DATA ||
			count_type == F2FS_DIRTY_NODES ||
		count_type == F2FS_RD_DATA || count_type == F2FS_RD_NODE ||
			count_type == F2FS_DIRTY_META ||
		count_type == F2FS_RD_META)
			count_type == F2FS_DIRTY_QDATA ||
		return;
			count_type == F2FS_DIRTY_IMETA)

		set_sbi_flag(sbi, SBI_IS_DIRTY);
		set_sbi_flag(sbi, SBI_IS_DIRTY);
}
}