mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
mm: call __wb_calc_thresh instead of wb_calc_thresh in wb_over_bg_thresh
Call __wb_calc_thresh to calculate wb bg_thresh of gdtc in wb_over_bg_thresh to remove unnecessary wrap in wb_calc_thresh. Link: https://lkml.kernel.org/r/20240425131724.36778-4-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Howard Cochran <hcochran@kernelspring.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Miklos Szeredi <mszeredi@redhat.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
fabd2e42bc
commit
3b3e412e5f
@ -2117,7 +2117,7 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb)
|
||||
if (gdtc->dirty > gdtc->bg_thresh)
|
||||
return true;
|
||||
|
||||
thresh = wb_calc_thresh(gdtc->wb, gdtc->bg_thresh);
|
||||
thresh = __wb_calc_thresh(gdtc, gdtc->bg_thresh);
|
||||
if (thresh < 2 * wb_stat_error())
|
||||
reclaimable = wb_stat_sum(wb, WB_RECLAIMABLE);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user