Commit 3b15f9d
mm/damon/core: fix return value from damos_wmark_metric_value
damos_wmark_metric_value's return value is 'unsigned long', so returning
-EINVAL as 'unsigned long' may turn out to be very different from the
expected one (using 2's complement) and treat as usual matric's value.
So, fix that, checking if returned value is not 0.
Link: https://lkml.kernel.org/r/20240506180238.53842-1-sj@kernel.org
Fixes: ee801b7 ("mm/damon/schemes: activate schemes based on a watermarks mechanism")
Signed-off-by: Alex Rusuf <yorha.op@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 4f68728 commit 3b15f9d
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1481 | 1481 | | |
1482 | 1482 | | |
1483 | 1483 | | |
1484 | | - | |
| 1484 | + | |
| 1485 | + | |
1485 | 1486 | | |
1486 | 1487 | | |
1487 | 1488 | | |
1488 | | - | |
| 1489 | + | |
1489 | 1490 | | |
| 1491 | + | |
1490 | 1492 | | |
1491 | 1493 | | |
1492 | 1494 | | |
| |||
1501 | 1503 | | |
1502 | 1504 | | |
1503 | 1505 | | |
1504 | | - | |
| 1506 | + | |
1505 | 1507 | | |
1506 | 1508 | | |
1507 | | - | |
1508 | 1509 | | |
1509 | 1510 | | |
1510 | 1511 | | |
| |||
0 commit comments