Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: fix arithmetic for bdi min_ratio
Since now bdi->min_ratio is part per million, fix the wrong arithmetic. Otherwise it will fail with -EINVAL when setting a reasonable min_ratio, as it tries to set min_ratio to (min_ratio * BDI_RATIO_SCALE) in percentage unit, which exceeds 100% anyway. # cat /sys/class/bdi/253\:0/min_ratio 0 # cat /sys/class/bdi/253\:0/max_ratio 100 # echo 1 > /sys/class/bdi/253\:0/min_ratio -bash: echo: write error: Invalid argument Link: https://lkml.kernel.org/r/[email protected] Fixes: 8021fb3 ("mm: split off __bdi_set_min_ratio() function") Signed-off-by: Jingbo Xu <[email protected]> Reported-by: Joseph Qi <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Stefan Roesch <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
- Loading branch information