From patchwork Tue Jul 11 05:50:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 118261 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp265008vqm; Mon, 10 Jul 2023 22:55:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlEwGuAEw983fO9TnmxM3k1gkPt1WOsKAzxigNKsJURaix7+vohEBVtII0ezAK1eH6o/LIMe X-Received: by 2002:a05:6402:1a33:b0:51b:df14:594e with SMTP id be19-20020a0564021a3300b0051bdf14594emr14514234edb.39.1689054902947; Mon, 10 Jul 2023 22:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689054902; cv=none; d=google.com; s=arc-20160816; b=A4owMCk7c1XtQp4aK0Xcim4mY+xMk7tlSWyIGyRUh8f02M0MMcRutKslGuADq7GB03 QGzK/Vol3UBq1+vNsvTvKCL1cmTTNuPzGLjmR2ZyycRuyszWfDvdpsZrQeibjkodSnca v/oOqfO50puv4vxYW+MsQCmDiboZPuovpuy/YCpwqyXQrwXBGDtC8IAMrFOl3Iph1w6K TP9CHpGBCjJ6SFrPKW5CGdiDyO6L9D5c0gYRB4E11IszyyPS1LuDCuro9Y3LjRCvilcT 7Dy0s0FIfKz9thwHQpDnhaH8qI5/kApj6OR3XUd9QaFlauBe58qLW8vxffWpQWpEUWcd VTdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LAkEVE24Qv+BBjIU19L5nrF8dLgTZ+0ofSIBY6kqzZM=; fh=4o7DIXI/66oHEW09L3854GeQKXh9nrvBy5ZxENMFBvA=; b=bpWtU3KCCuoUgIxfTuCzQEi4jw9MDqIEQygeVl5sVXsLKfUCFUeY/XgtSe4vSnWF58 Y1b8Htoc33BhXas/RjjZMSXJBt+tAQi19lmx+I1krSeaeo9GmVrvvkAgUenzMzMACPrg Iw3g+vOndaICgolUegsSqLsYRqzUTpIEA01HJzS/EOa80xQ/Iy+x1g8GOgw/tqmQgfxL BdjCvClmEw8gjyzZRlXBns8wB9ZGS64i1+nU50qdIXHbqexBafDdx5Hc70Je/gnkvI7j QtI0Db60u72K9APkv17Pe8RrOJIsYnpSz49URIYbJTrfJRDRZwhzMOELClt4P8PUEWWL 8drA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a50fb02000000b0051bfd21d20fsi1200188edq.87.2023.07.10.22.54.39; Mon, 10 Jul 2023 22:55:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230358AbjGKFuV (ORCPT + 99 others); Tue, 11 Jul 2023 01:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229964AbjGKFuI (ORCPT ); Tue, 11 Jul 2023 01:50:08 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F61A1B2 for ; Mon, 10 Jul 2023 22:50:05 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4R0VLc1cl3zqSHf; Tue, 11 Jul 2023 13:49:28 +0800 (CST) Received: from huawei.com (10.174.151.185) 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.2507.27; Tue, 11 Jul 2023 13:50:01 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH v2 1/8] mm: memory-failure: remove unneeded PageHuge() check Date: Tue, 11 Jul 2023 13:50:09 +0800 Message-ID: <20230711055016.2286677-2-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230711055016.2286677-1-linmiaohe@huawei.com> References: <20230711055016.2286677-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771102434122595569 X-GMAIL-MSGID: 1771102434122595569 PageHuge() check in me_huge_page() is just for potential problems. Remove it as it's actually dead code and won't catch anything. Signed-off-by: Miaohe Lin Acked-by: Naoya Horiguchi --- mm/memory-failure.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 64d7d34c177a..913fcf02ad38 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1187,9 +1187,6 @@ static int me_huge_page(struct page_state *ps, struct page *p) struct address_space *mapping; bool extra_pins = false; - if (!PageHuge(hpage)) - return MF_DELAYED; - mapping = page_mapping(hpage); if (mapping) { res = truncate_error_page(hpage, page_to_pfn(p), mapping);