From: Kundan Kumar Date: Fri, 13 Feb 2026 05:46:32 +0000 (+0530) Subject: f2fs: stop using writeback internals for dirty_exceeded checks X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=07043a6ebeb27a9f89b60484c163b20220f81325;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Andreas Gruenbacher Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Link: https://patch.msgid.link/20260213054634.79785-3-kundan.kumar@samsung.com Signed-off-by: Christian Brauner --- diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 74992fd9c9b66..2030e943ab9b3 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -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; diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 068845660b0fa..08735a165433c 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -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)