From patchwork Wed Feb 16 09:14:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12748276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0973BC433EF for ; Wed, 16 Feb 2022 09:15:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 668F76B0081; Wed, 16 Feb 2022 04:15:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5CB896B0083; Wed, 16 Feb 2022 04:15:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 46C8F6B0087; Wed, 16 Feb 2022 04:15:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 350066B0081 for ; Wed, 16 Feb 2022 04:15:21 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id EA25D2341B for ; Wed, 16 Feb 2022 09:15:20 +0000 (UTC) X-FDA: 79148084400.04.407AE36 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf11.hostedemail.com (Postfix) with ESMTP id 0E0D140004 for ; Wed, 16 Feb 2022 09:15:18 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4JzByR1kmSz1FCXG; Wed, 16 Feb 2022 17:10:55 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 16 Feb 2022 17:15:16 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH v2 8/8] mm/memory-failure.c: remove unnecessary PageTransTail check Date: Wed, 16 Feb 2022 17:14:31 +0800 Message-ID: <20220216091431.39406-9-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220216091431.39406-1-linmiaohe@huawei.com> References: <20220216091431.39406-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Stat-Signature: r83hshg7n7ctqx3xh9x8qino1zk79rdb X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 0E0D140004 Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspam-User: X-HE-Tag: 1645002918-743472 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: When we reach here, we're guaranteed to have non-compound page as thp is already splited. Remove this unnecessary PageTransTail check. Signed-off-by: Miaohe Lin Acked-by: Naoya Horiguchi --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 5d2e653a145d..6e7baa90214a 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1842,7 +1842,7 @@ int memory_failure(unsigned long pfn, int flags) * page_lock. We need wait writeback completion for this page or it * may trigger vfs BUG while evict inode. */ - if (!PageTransTail(p) && !PageLRU(p) && !PageWriteback(p)) + if (!PageLRU(p) && !PageWriteback(p)) goto identify_page_state; /*