Skip to content
Commit 3b15f9d1 authored by Alex Rusuf's avatar Alex Rusuf Committed by Andrew Morton
Browse files

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: ee801b7d ("mm/damon/schemes: activate schemes based on a watermarks mechanism")
Signed-off-by: default avatarAlex Rusuf <yorha.op@gmail.com>
Reviewed-by: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 4f687281
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment