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

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

f2fs: fix to be aware discard/preflush/dio command in is_idle()



This patch adds missing in-flight discard/preflush/dio command count
check in is_idle().

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 02b16d0a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2158,7 +2158,11 @@ static inline bool is_idle(struct f2fs_sb_info *sbi, int type)
{
	if (get_pages(sbi, F2FS_RD_DATA) || get_pages(sbi, F2FS_RD_NODE) ||
		get_pages(sbi, F2FS_RD_META) || get_pages(sbi, F2FS_WB_DATA) ||
		get_pages(sbi, F2FS_WB_CP_DATA))
		get_pages(sbi, F2FS_WB_CP_DATA) ||
		get_pages(sbi, F2FS_DIO_READ) ||
		get_pages(sbi, F2FS_DIO_WRITE) ||
		atomic_read(&SM_I(sbi)->dcc_info->issing_discard) ||
		atomic_read(&SM_I(sbi)->fcc_info->issing_flush))
		return false;
	return f2fs_time_over(sbi, type);
}