diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 6723ccc175854ac3a46ca70f281f2a35007cc627..7f327c0ba4e32caf74e4334453b35d26e239202f 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -711,6 +711,9 @@ static inline unsigned int max_hw_blocks(struct f2fs_sb_info *sbi) */ static inline int nr_pages_to_skip(struct f2fs_sb_info *sbi, int type) { + if (sbi->sb->s_bdi->dirty_exceeded) + return 0; + if (type == DATA) return sbi->blocks_per_seg; else if (type == NODE)