f2fs: stop using writeback internals for dirty_exceeded checks

Replace direct dereferences of dirty_exceeded with the core helper
bdi_wb_dirty_exceeded(), removing f2fs dependencies on writeback
internals.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kundan Kumar <kundan.kumar@samsung.com>
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Link: https://patch.msgid.link/20260213054634.79785-3-kundan.kumar@samsung.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Kundan Kumar
2026-02-13 11:16:32 +05:30
committed by Christian Brauner
parent a235d3bcd2
commit 07043a6ebe
2 changed files with 3 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ bool f2fs_available_free_memory(struct f2fs_sb_info *sbi, int type)
if (excess_cached_nats(sbi))
res = false;
} else if (type == DIRTY_DENTS) {
if (sbi->sb->s_bdi->wb.dirty_exceeded)
if (bdi_wb_dirty_exceeded(sbi->sb->s_bdi))
return false;
mem_size = get_pages(sbi, F2FS_DIRTY_DENTS);
res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1);
@@ -119,7 +119,7 @@ bool f2fs_available_free_memory(struct f2fs_sb_info *sbi, int type)
res = false;
#endif
} else {
if (!sbi->sb->s_bdi->wb.dirty_exceeded)
if (!bdi_wb_dirty_exceeded(sbi->sb->s_bdi))
return true;
}
return res;

View File

@@ -992,7 +992,7 @@ static inline bool sec_usage_check(struct f2fs_sb_info *sbi, unsigned int secno)
*/
static inline int nr_pages_to_skip(struct f2fs_sb_info *sbi, int type)
{
if (sbi->sb->s_bdi->wb.dirty_exceeded)
if (bdi_wb_dirty_exceeded(sbi->sb->s_bdi))
return 0;
if (type == DATA)