mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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:
committed by
Christian Brauner
parent
a235d3bcd2
commit
07043a6ebe
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user