From patchwork Tue Mar 22 21:44:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12789203 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 316BFC433F5 for ; Tue, 22 Mar 2022 21:44:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B2D4B6B0114; Tue, 22 Mar 2022 17:44:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AB5BD6B0113; Tue, 22 Mar 2022 17:44:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9305E6B0114; Tue, 22 Mar 2022 17:44:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 7ED726B0112 for ; Tue, 22 Mar 2022 17:44:35 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4BF8121D12 for ; Tue, 22 Mar 2022 21:44:35 +0000 (UTC) X-FDA: 79273351710.06.DD1AFAF Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id D95C31A0018 for ; Tue, 22 Mar 2022 21:44:34 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4BCCC61523; Tue, 22 Mar 2022 21:44:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3D0FC340EC; Tue, 22 Mar 2022 21:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985473; bh=ufU2dBdaV6hQjERzZES5W1c91mKRaDKZ44CKgjOy4ek=; h=Date:To:From:In-Reply-To:Subject:From; b=b8QpBTuK/8KnsZ+HMy9OLdYQqvzvU5OHR7SjRMaRvtgAZSKUswv2+ZN6bqxnMosvs /UDyUQgbB+w58as6oI5yGw/B4LkHWDY1IxL5XKRLeh8AryWPPp5sZdoSNmH4QeIlBl sDCpLR0yUWRpnR4gAwRZthr4gaNqyeHtip/Z/IGk= Date: Tue, 22 Mar 2022 14:44:33 -0700 To: naoya.horiguchi@nec.com,linmiaohe@huawei.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> Subject: [patch 119/227] mm/memory-failure.c: remove unnecessary PageTransTail check Message-Id: <20220322214433.A3D0FC340EC@smtp.kernel.org> X-Stat-Signature: he1opwohygn99rhe44qkc7knbahn58xk Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=b8QpBTuK; spf=pass (imf19.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: D95C31A0018 X-HE-Tag: 1647985474-163301 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: From: Miaohe Lin Subject: mm/memory-failure.c: remove unnecessary PageTransTail check When we reach here, we're guaranteed to have non-compound page as thp is already splited. Remove this unnecessary PageTransTail check. Link: https://lkml.kernel.org/r/20220218090118.1105-9-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/memory-failure.c~mm-memory-failurec-remove-unnecessary-pagetranstail-check +++ a/mm/memory-failure.c @@ -1844,7 +1844,7 @@ try_again: * 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; /*