Skip to content

Commit 4839e79

Browse files
osalvadorvilardagaakpm00
authored andcommitted
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]>
1 parent 84d6ac3 commit 4839e79

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mm/page_owner.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,7 @@ static int stack_print(struct seq_file *m, void *v)
865865
entries = stack_record->entries;
866866
stack_count = refcount_read(&stack_record->count) - 1;
867867

868-
if (!nr_entries || nr_entries < 0 || stack_count < 1 ||
869-
stack_count < page_owner_stack_threshold)
868+
if (stack_count < 1 || stack_count < page_owner_stack_threshold)
870869
return 0;
871870

872871
for (i = 0; i < nr_entries; i++)

0 commit comments

Comments
 (0)