Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4220864rwr; Mon, 8 May 2023 04:58:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4RIXMLKH2Wy+WwbUMzjoixlbvlEylcbG7fFzRUg9hRgvFPaWXkhQCLteO+yoiuYXjXly/9 X-Received: by 2002:a17:902:e805:b0:1ac:820e:c34a with SMTP id u5-20020a170902e80500b001ac820ec34amr2201742plg.0.1683547113932; Mon, 08 May 2023 04:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683547113; cv=none; d=google.com; s=arc-20160816; b=yVkCJpsaM1Cb6hNtVudz+NkdWLzD5wD8AF9YU0DRUTKkOt9epjZwfwsSVRDz9TA7vY 9qdkCA36/47ZU8U6SLB2QafpWZJdMD+le52/MMGWpHIdry4rW7r6FoXMbL+P0ohy5csg 49belv43DdqUFbuSt8aYV7lY0TknFcM8N0JTOG4sMsWVMvTWAV41ed9Lntbr7cV6kfKl qk8OeqrzLZ+IzRN3ew8tuDo9dL1RJlOmGKOTSTfY250YCcLdPCaGP3nBKxdGm9Ow/V3s gwuhTXCoKNJZIu5scMNYEpQtkTAwTOjdxLAAFDTApK67R5mZhmnO2fvPMluiF5l253nr RpGA== 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 :message-id:date:subject:cc:to:from; bh=QNDCvuYbSG3ZRfk/K0TZBYN6nOfxr4IQ0kfLJ+C2Ryk=; b=QD30JhFB1OQMyK4Jm7bR2Ifo4NODjZW61xElHXumGRY3ZCvxtkoG9ebMyJbtmLTCxt jTt0+jTM4kytnTeTNT/YAb1M4PxVNcwOpYtSgTCuXtqJlRVf325ZInZddyGZ+IVQHsIj jYKo4UKyGUR/ubzfUWBUzVZAcNFTzNioXKBi2FU3j5rH16m95SlTs6zdeXvjFk6SO08r Vn4NeczZg2xVN1JPoUAlTl3u6XR/qDF/MmVBMb2pXLDFB6xXyhPwXsiYHH4eoZnndbiM ZKoN6uGy2hczH7oxKcYEmmo4ZFuit321FSEvhZr0tvu11Cl/3vPIujQQHn5p8zbqZ3EB 8PAg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z24-20020a1709028f9800b001ab12815159si7702384plo.414.2023.05.08.04.58.21; Mon, 08 May 2023 04:58:33 -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 S235631AbjEHLYi (ORCPT + 99 others); Mon, 8 May 2023 07:24:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235653AbjEHLYS (ORCPT ); Mon, 8 May 2023 07:24:18 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CE1E37031 for ; Mon, 8 May 2023 04:24:18 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QFJjf2dNpzpV29; Mon, 8 May 2023 19:20:06 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 8 May 2023 19:24:14 +0800 From: Kefeng Wang To: Naoya Horiguchi , Andrew Morton CC: , , Kefeng Wang Subject: [PATCH 1/2] mm: memory_failure: move memory_failure_attr_group under MEMORY_FAILURE Date: Mon, 8 May 2023 19:41:27 +0800 Message-ID: <20230508114128.37081-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 The memory_failure_attr_group is only called if MEMORY_FAILURE enabled, move it under this configuration. Signed-off-by: Kefeng Wang --- include/linux/mm.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index d533ef955dd0..cdb0377f97fa 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3687,6 +3687,10 @@ extern void shake_page(struct page *p); extern atomic_long_t num_poisoned_pages __read_mostly; extern int soft_offline_page(unsigned long pfn, int flags); #ifdef CONFIG_MEMORY_FAILURE +/* + * Sysfs entries for memory failure handling statistics. + */ +extern const struct attribute_group memory_failure_attr_group; extern void memory_failure_queue(unsigned long pfn, int flags); extern int __get_huge_page_for_hwpoison(unsigned long pfn, int flags, bool *migratable_cleared); @@ -3779,11 +3783,6 @@ enum mf_action_page_type { MF_MSG_UNKNOWN, }; -/* - * Sysfs entries for memory failure handling statistics. - */ -extern const struct attribute_group memory_failure_attr_group; - #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) extern void clear_huge_page(struct page *page, unsigned long addr_hint, -- 2.35.3