aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOscar Salvador <[email protected]>2024-03-06 13:32:17 +0100
committerAndrew Morton <[email protected]>2024-03-06 13:04:20 -0800
commit4839e79c7eae747810c81848729e050eb5440547 (patch)
treeacf30699a75ce640c1ab34e2486a8588c42c4b36
parent84d6ac31c34f2a6e056f967e6105160b6e2891c4 (diff)
mm,page_owner: drop unnecessary check
stackdepot only saves stack_records which size is greather than 0, so we cannot possibly have empty stack_records. Drop the check. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Oscar Salvador <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: kernel test robot <[email protected]> Cc: Marco Elver <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--mm/page_owner.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/page_owner.c b/mm/page_owner.c
index 7163a1c44ccf..e7139952ffd9 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -865,8 +865,7 @@ static int stack_print(struct seq_file *m, void *v)
entries = stack_record->entries;
stack_count = refcount_read(&stack_record->count) - 1;
- if (!nr_entries || nr_entries < 0 || stack_count < 1 ||
- stack_count < page_owner_stack_threshold)
+ if (stack_count < 1 || stack_count < page_owner_stack_threshold)
return 0;
for (i = 0; i < nr_entries; i++)