summaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorXianting Tian <xianting.tian@linux.alibaba.com>2022-04-29 09:16:04 +0300
committerakpm <akpm@linux-foundation.org>2022-04-29 09:16:04 +0300
commitc310e06cc4e44b4ec4bc02f0494a7f55cc36c1be (patch)
treea70df7e45bdc856eadfae9755e5fb07d3887d47e /fs/proc
parentb2cb6826b6df2bdf91ae4406fd2ef97da7a9cd35 (diff)
downloadlinux-c310e06cc4e44b4ec4bc02f0494a7f55cc36c1be.tar.xz
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 <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>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/task_mmu.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index f46060eb91b5..a843d13e2e1a 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);