1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-24 09:13:20 -05:00
linux/mm/damon
Alex Rusuf 3b15f9d1c2 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: ee801b7dd7 ("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>
2024-05-11 15:41:36 -07:00
..
core-test.h
core.c mm/damon/core: fix return value from damos_wmark_metric_value 2024-05-11 15:41:36 -07:00
dbgfs-test.h
dbgfs.c
Kconfig
lru_sort.c
Makefile
modules-common.c
modules-common.h
ops-common.c
ops-common.h
paddr.c mm/vmscan: remove ignore_references argument of reclaim_pages() 2024-05-07 10:37:02 -07:00
reclaim.c
sysfs-common.c
sysfs-common.h
sysfs-schemes.c mm/damon: add DAMOS filter type YOUNG 2024-05-05 17:53:55 -07:00
sysfs-test.h
sysfs.c
vaddr-test.h
vaddr.c