* [PATCH] mm: proc: remove redundant page validation of pte_page
@ 2022-03-16 2:59 Xianting Tian
2022-03-16 3:23 ` Chaitanya Kulkarni
0 siblings, 1 reply; 2+ messages in thread
From: Xianting Tian @ 2022-03-16 2:59 UTC (permalink / raw)
To: adobriyan, shy828301, sashal, akpm, linmiaohe
Cc: linux-kernel, linux-fsdevel, Xianting Tian
pte_page() always returns a valid page, so remove the redundant
page validation, as we did in many other places.
Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
---
fs/proc/task_mmu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index f46060eb9..a843d13e2 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);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: proc: remove redundant page validation of pte_page
2022-03-16 2:59 [PATCH] mm: proc: remove redundant page validation of pte_page Xianting Tian
@ 2022-03-16 3:23 ` Chaitanya Kulkarni
0 siblings, 0 replies; 2+ messages in thread
From: Chaitanya Kulkarni @ 2022-03-16 3:23 UTC (permalink / raw)
To: Xianting Tian, adobriyan@gmail.com, shy828301@gmail.com,
sashal@kernel.org, akpm@linux-foundation.org,
linmiaohe@huawei.com
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
On 3/15/22 19:59, Xianting Tian wrote:
> pte_page() always returns a valid page, so remove the redundant
> page validation, as we did in many other places.
>
> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
> ---
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-16 3:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-16 2:59 [PATCH] mm: proc: remove redundant page validation of pte_page Xianting Tian
2022-03-16 3:23 ` Chaitanya Kulkarni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).