]> git.baikalelectronics.ru Git - kernel.git/commit
hugetlb: remove unnecessary set_page_count in prep_compound_gigantic_page
authorMike Kravetz <mike.kravetz@oracle.com>
Fri, 5 Nov 2021 20:42:04 +0000 (13:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:39 +0000 (13:30 -0700)
commit004eded23fbaf166c21a24bedb1083b5db64f0fb
treea5dcac64a8703442bac48dc867f391684616a005
parente69d06a8532fae2bd513973d87ed2f6f1bdcc6a8
hugetlb: remove unnecessary set_page_count in prep_compound_gigantic_page

In commit d3c574f83c24 ("hugetlb: address ref count racing in
prep_compound_gigantic_page"), page_ref_freeze is used to atomically
zero the ref count of tail pages iff they are 1.  The unconditional call
to set_page_count(0) was left in the code.  This call is after
page_ref_freeze so it is really a noop.

Remove redundant and unnecessary set_page_count call.

Link: https://lkml.kernel.org/r/20211026220635.35187-1-mike.kravetz@oracle.com
Fixes: d3c574f83c249 ("hugetlb: address ref count racing in prep_compound_gigantic_page")
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Suggested-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c