Skip to content

Commit

Permalink
fs/proc/task_mmu.c: remove redundant page validation of pte_page
Browse files Browse the repository at this point in the history
pte_page() always returns a valid page, so remove the redundant page
validation, as we did in many other places.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Xianting Tian <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: Miaohe Lin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
Xianting Tian authored and akpm00 committed Apr 29, 2022
1 parent b2cb682 commit c310e06
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/proc/task_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,8 +1873,6 @@ static int gather_hugetlb_stats(pte_t *pte, unsigned long hmask,
return 0;

page = pte_page(huge_pte);
if (!page)
return 0;

md = walk->private;
gather_stats(page, md, pte_dirty(huge_pte), 1);
Expand Down

0 comments on commit c310e06

Please sign in to comment.