[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210316124007.20474-5-linmiaohe@huawei.com>
Date: Tue, 16 Mar 2021 08:40:05 -0400
From: Miaohe Lin <linmiaohe@...wei.com>
To: <akpm@...ux-foundation.org>
CC: <ziy@...dia.com>, <willy@...radead.org>,
<william.kucharski@...cle.com>, <vbabka@...e.cz>,
<peterx@...hat.com>, <yulei.kernel@...il.com>, <walken@...gle.com>,
<aneesh.kumar@...ux.ibm.com>, <rcampbell@...dia.com>,
<thomas_os@...pmail.org>, <yang.shi@...ux.alibaba.com>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<linmiaohe@...wei.com>
Subject: [PATCH v2 4/6] mm/huge_memory.c: remove redundant PageCompound() check
The !PageCompound() check limits the page must be head or tail while
!PageHead() further limits it to page head only. So !PageHead() check
is equivalent here.
Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
---
mm/huge_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 57a1b72e03c8..ebfb0bf2e3fd 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1291,7 +1291,7 @@ vm_fault_t do_huge_pmd_wp_page(struct vm_fault *vmf, pmd_t orig_pmd)
}
page = pmd_page(orig_pmd);
- VM_BUG_ON_PAGE(!PageCompound(page) || !PageHead(page), page);
+ VM_BUG_ON_PAGE(!PageHead(page), page);
/* Lock page for reuse_swap_page() */
if (!trylock_page(page)) {
--
2.19.1
Powered by blists - more mailing lists