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/20220316025947.328276-1-xianting.tian@linux.alibaba.com
Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • 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.