Message ID | 20230711055016.2286677-8-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 6E70CC001DE for <linux-mm@archiver.kernel.org>; Tue, 11 Jul 2023 05:50:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 556B38E0003; Tue, 11 Jul 2023 01:50:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2716B8E0008; Tue, 11 Jul 2023 01:50:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D67E98E0002; Tue, 11 Jul 2023 01:50:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6F4658E0003 for <linux-mm@kvack.org>; Tue, 11 Jul 2023 01:50:11 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3A283AF6A2 for <linux-mm@kvack.org>; Tue, 11 Jul 2023 05:50:11 +0000 (UTC) X-FDA: 80998255422.16.545960B Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf18.hostedemail.com (Postfix) with ESMTP id E689D1C0008 for <linux-mm@kvack.org>; Tue, 11 Jul 2023 05:50:08 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689054609; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IV0T4/Lz70cuW+hklOvSGRAWozfHSplI/Flw5cVKpWk=; b=F5jug5Mt666/0yMwQEAa4AdPmOwIaB2NP7wdvVFs0zrVFU+MsK/euJ8GMc1KlCFw4l7cAw b7xBIhcY2mL3+Y0FfIqABUsAT3oD5emQaXVimL1C0Qo7vFOlbg26bt3jIT4g5XFcYfkJ6R JKHmGCvC0XVdY2sOvYlWbKNHQIEeZIs= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689054609; a=rsa-sha256; cv=none; b=n6KUsfXroceXkOgiIZKjnEZxxsXYraxGIRVW4fCNCv8/ZhJvtt7+j7sP9NmPV/iSACyAKE lRufA9FbM9qCC8q/o7+01+JeBsoT7ZbW29/W3cntmHSvVx3P3L8UzjQ76nzmF+kLuVh/QI ueuWM8IHggS5EcMhqgoE8C3uhHzpYyQ= Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4R0VJd66LkzPk1v; Tue, 11 Jul 2023 13:47:45 +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:04 +0800 From: Miaohe Lin <linmiaohe@huawei.com> To: <akpm@linux-foundation.org>, <naoya.horiguchi@nec.com> CC: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <linmiaohe@huawei.com> Subject: [PATCH v2 7/8] mm: memory-failure: fetch compound head after extra page refcnt is held Date: Tue, 11 Jul 2023 13:50:15 +0800 Message-ID: <20230711055016.2286677-8-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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: E689D1C0008 X-Stat-Signature: 3ktknfu8onhuu4bpubcyq1bwmhq45haz X-HE-Tag: 1689054608-193572 X-HE-Meta: U2FsdGVkX197GITUB9qTufTHB2FhYhu/GbbJH8pCNXno51P2Zt5ILDKOaHpcMNq4kAgGr6dRsW1Av1mL/lYdh3IfavEOVXFWoUY+T283beHz8ZnFuqxi844J+UTPLRDzCb6jOmcFetuLNDEeT/o/oFY3+CIDpsrWCrHpngSAMD53AGQBCb5zDEJ+M7LpIOJXbLg736Tg1qcqZVpaERahmBiQbEvXeN8orwkx53zEsN1mSmP/Kk11+g3DpfxiGCZTZkG8eGHGqeKk2U+yr4kLX7OIetMH16gNLQYF+aitPSYwA5jrMzcRijcd2iQI+U8SrKbK/kAOXWu2qngIlZOb/REAq1eIFR/k5ROpsdk9sjKCiShUkeFm85cpfFJ7KErdAyN0zr8cI8VIkaawVd8WaxDtLHy/SUmG5JFVUAfkHA5Vn/+knlyG3IDlGVHa4vg8JE0b5m0yRzxYJ4vZqmobOQB5fxbNK9JkD7V7F6K7WCsgZtuPvQdSw7y9xxQb7EN6ait7WGQpsWMBjnCk/u0pEyGUJoo2LbcDa6WKNnEAoLRD1Dz4s1zoJvLP2PerfAM7sqhYsK0YWs+ugN66YB+vZYTD8m1YhWbdiY6UI29yc+Y4UacM8HHARI4efVMx29MoWrZvPsIQ6aAxzwSRaKaP+izH4hQWLePYi0htGZ/+SOfpiRx7bO51k0IowDpqnRr1WUYdkNBoIRku5MGcZeWacM/yEBgtaAum2dd5CKJxTx8/cCT8hLO9+UCIHU+G5hfKsI+egowxzrE+zrEKMpxVVTGVkWBdEcLhGIfribdFpdIfZYsc66v99DCI8KeyZZjtdbKqHAaDbyxvl4xrPwgrDIdAp6zoTdOsQGd4/08yjzLolRxqMzN3pEOTdzVDQase9QJJXNfK/5/pqjrJ0Aa77D12oW7ovwFhNUXWQAtLb5QHnmFm1099Zwpe6InuWm21A6ur5K8GaS++8rYy6JS RAjLq0UL yoM0orRZulgLgd2wYMB1G6+t4PxNj2OieoJhJpOWmGjs+3Za1VGduLjVzT3tci8TVfmTGunMfYG1u0ySvWfdeVx/sBJVbC6JJ9evzFOcpJMfXCrfE/5jYoKyaV8gvCsMOjLdeXJHgVjYyrlyXC+yVXxEis8YEweEBuSsykBxaYRszQ6o= 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: <linux-mm.kvack.org> |
Series |
A few fixup and cleanup patches for memory-failure
|
expand
|
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index db4c530944d6..af34fd4669d3 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -2186,8 +2186,6 @@ int memory_failure(unsigned long pfn, int flags) goto unlock_mutex; } - hpage = compound_head(p); - /* * We need/can do nothing about count=0 pages. * 1) it's a free page, and therefore in safe hand: @@ -2226,6 +2224,7 @@ int memory_failure(unsigned long pfn, int flags) } } + hpage = compound_head(p); if (PageTransHuge(hpage)) { /* * The flag must be set after the refcount is bumped