Skip to content

Commit 8021fb3

Browse files
Stefan Roeschakpm00
authored andcommitted
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/[email protected] Signed-off-by: Stefan Roesch <[email protected]> Cc: Chris Mason <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 712c00d commit 8021fb3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mm/page-writeback.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ static u64 bdi_get_bytes(unsigned int ratio)
685685
return bytes;
686686
}
687687

688-
int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio)
688+
static int __bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio)
689689
{
690690
unsigned int delta;
691691
int ret = 0;
@@ -731,6 +731,11 @@ static int __bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ra
731731
return ret;
732732
}
733733

734+
int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio)
735+
{
736+
return __bdi_set_min_ratio(bdi, min_ratio * BDI_RATIO_SCALE);
737+
}
738+
734739
int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio)
735740
{
736741
if (max_ratio > 100)

0 commit comments

Comments
 (0)