From: Xianting Tian Date: Fri, 29 Apr 2022 06:16:04 +0000 (-0700) Subject: fs/proc/task_mmu.c: remove redundant page validation of pte_page X-Git-Tag: v6.1-rc5~1253^2~339 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c310e06cc4e44b4ec4bc02f0494a7f55cc36c1be;p=platform%2Fkernel%2Flinux-starfive.git fs/proc/task_mmu.c: remove redundant page validation of pte_page 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 Reviewed-by: Chaitanya Kulkarni Cc: Alexey Dobriyan Cc: Yang Shi Cc: Sasha Levin Cc: Miaohe Lin Signed-off-by: Andrew Morton --- diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index f46060e..a843d13 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -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);