linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/hugetlb: remove a meaningless if statement in gigantic page initialization
@ 2021-02-02 10:12 yanfei.xu
  2021-02-02 10:06 ` David Hildenbrand
  0 siblings, 1 reply; 3+ messages in thread
From: yanfei.xu @ 2021-02-02 10:12 UTC (permalink / raw)
  To: mike.kravetz, akpm; +Cc: linux-mm, linux-kernel

From: Yanfei Xu <yanfei.xu@windriver.com>

Gigantic page is a compound page and its order is more than 1.
Thus it must be available for hpage_pincount. Let's remove this
meaningless if statement.

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
---
 mm/hugetlb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index a3e4fa2c5e94..73d602f8c7e2 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1501,9 +1501,7 @@ static void prep_compound_gigantic_page(struct page *page, unsigned int order)
 		set_compound_head(p, page);
 	}
 	atomic_set(compound_mapcount_ptr(page), -1);
-
-	if (hpage_pincount_available(page))
-		atomic_set(compound_pincount_ptr(page), 0);
+	atomic_set(compound_pincount_ptr(page), 0);
 }
 
 /*
-- 
2.27.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-02 10:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 10:12 [PATCH] mm/hugetlb: remove a meaningless if statement in gigantic page initialization yanfei.xu
2021-02-02 10:06 ` David Hildenbrand
2021-02-02 10:19   ` Xu, Yanfei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox