diff options
-rw-r--r-- | mm/damon/reclaim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c index f37c5d4b27fa..8efbfb24f3a1 100644 --- a/mm/damon/reclaim.c +++ b/mm/damon/reclaim.c @@ -238,7 +238,7 @@ static int walk_system_ram(struct resource *res, void *arg) { struct damon_reclaim_ram_walk_arg *a = arg; - if (a->end - a->start < res->end - res->start) { + if (a->end - a->start < resource_size(res)) { a->start = res->start; a->end = res->end; } |