mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
mm/hwpoison: don't need to hold compound lock for hugetlbfs page
compound lock is introduced by commit e9da73d67("thp: compound_lock."), it
is used to serialize put_page against __split_huge_page_refcount(). In
addition, transparent hugepages will be splitted in hwpoison handler and
just one subpage will be poisoned. There is unnecessary to hold compound
lock for hugetlbfs page. This patch replace compound_trans_order by
compond_order in the place where the page is hugetlbfs page.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
841fcc583f
commit
f9121153fd
2 changed files with 6 additions and 20 deletions
|
|
@ -495,20 +495,6 @@ static inline int compound_order(struct page *page)
|
|||
return (unsigned long)page[1].lru.prev;
|
||||
}
|
||||
|
||||
static inline int compound_trans_order(struct page *page)
|
||||
{
|
||||
int order;
|
||||
unsigned long flags;
|
||||
|
||||
if (!PageHead(page))
|
||||
return 0;
|
||||
|
||||
flags = compound_lock_irqsave(page);
|
||||
order = compound_order(page);
|
||||
compound_unlock_irqrestore(page, flags);
|
||||
return order;
|
||||
}
|
||||
|
||||
static inline void set_compound_order(struct page *page, unsigned long order)
|
||||
{
|
||||
page[1].lru.prev = (void *)order;
|
||||
|
|
|
|||
Loading…
Reference in a new issue