From: Stefan Roesch Date: Sat, 19 Nov 2022 00:52:06 +0000 (-0800) Subject: mm: split off __bdi_set_min_ratio() function X-Git-Tag: v6.6.17~5931^2~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8021fb3232f265b81c7e4e7aba15bc3a04ff1fd3;p=platform%2Fkernel%2Flinux-rpi.git mm: split off __bdi_set_min_ratio() function This splits off the __bdi_set_min_ratio() function from the bdi_set_min_ratio() function. The __bdi_set_min_ratio() function will also be called from the bdi_set_min_bytes() function, which will be introduced in the next patch. Link: https://lkml.kernel.org/r/20221119005215.3052436-12-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton --- diff --git a/mm/page-writeback.c b/mm/page-writeback.c index c478244..cefee72 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -685,7 +685,7 @@ static u64 bdi_get_bytes(unsigned int ratio) return bytes; } -int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio) +static int __bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio) { unsigned int delta; int ret = 0; @@ -731,6 +731,11 @@ static int __bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ra return ret; } +int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio) +{ + return __bdi_set_min_ratio(bdi, min_ratio * BDI_RATIO_SCALE); +} + int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio) { if (max_ratio > 100)