[linux-next] mm/hugetlb: replace get_hwpoison_huge_page() with get_hwpoison_hugetlb_folio() when !CONFIG_HUGETLBFS
Message ID | 202301201036092738081@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp664520wrn; Thu, 19 Jan 2023 18:46:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuu1B1CoFBHP7Ee2FqOt3sKx7IBuP/kPVxdjSjGhmayw5XjUrHBfyPau0Qg3OxwvopXzALE X-Received: by 2002:a17:907:961b:b0:872:8e48:3b91 with SMTP id gb27-20020a170907961b00b008728e483b91mr16716563ejc.52.1674182772550; Thu, 19 Jan 2023 18:46:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674182772; cv=none; d=google.com; s=arc-20160816; b=DklrdWu5dL5FPLE71/TD/ZoVpDAs2U6Vmvxkr+ybWc4t9fcwMkvMgbAmReZnjjUnry bOjnmKx3KT2Fsy3SMtDpF3wPVcHby9DHm/ugvwvab4Hn3FHrdHMDdOvX/F8Im75gDrB/ 2ixePBv85+xzu1lKo0YeAJ7QG++PVzov/wb7l2/kG/vXshUjqoSfOGHaXgPQvuYCAsZQ k9UvP2NQlx5LzlQUWU9OGEMKAA4e7ZXYoXuHFwW/dRUPVCFHpQtTRUiDf1K/8Nxk/Gmx 7QeJqX2rkYjS+HehxyIqB366qNdXbrBh3pUnAhsQvnfmFee4S8RM9YZ67SDXqnZu8lFz YBww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=wS+xnkMNm9LWncnR18Aa6xtINUyAJmEmVSmS0Y8F6pM=; b=S2SqNeXHnFyrFho6NlZ7q3G78/Oj8gJTK5dvDOyOZBHGlLVGuhxki4GMFch0yGZGIk DVmXuCFHuaDUczBsPmggJKE/PHc+iSXDHWnllt0tfHSpccu7oJ6MeFvNVbzqabsTl8kN 1FrFG8adgQnggUyhu+8SsOXpEHV+yim33dRq9YaZbOIAHPdiBxvguirhekKzYEDk4Sr+ IkPt6xHPK+L921Y6CJuqskdxBF+gbi18NBkYOLIC30dujE6mrlksgH2mzhgqbp3Xbmn5 gxfPfHobWm+8EUidIiIIqyisBLK39YqgKGbsdyUSd7JWmYl0HE4zcy/LJzeVlv9NTkAW aXgg== 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=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk15-20020a1709077f8f00b0087345b10ecbsi8374813ejc.1008.2023.01.19.18.45.04; Thu, 19 Jan 2023 18:46:12 -0800 (PST) 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=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbjATCgY (ORCPT <rfc822;pavtiger@gmail.com> + 99 others); Thu, 19 Jan 2023 21:36:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229863AbjATCgU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 19 Jan 2023 21:36:20 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC30CAA5DF for <linux-kernel@vger.kernel.org>; Thu, 19 Jan 2023 18:36:14 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NykC06Mgzz508D2; Fri, 20 Jan 2023 10:36:12 +0800 (CST) Received: from szxlzmapp02.zte.com.cn ([10.5.231.79]) by mse-fl1.zte.com.cn with SMTP id 30K2a7LV064230; Fri, 20 Jan 2023 10:36:07 +0800 (+08) (envelope-from yang.yang29@zte.com.cn) Received: from mapi (szxlzmapp04[null]) by mapi (Zmail) with MAPI id mid14; Fri, 20 Jan 2023 10:36:09 +0800 (CST) Date: Fri, 20 Jan 2023 10:36:09 +0800 (CST) X-Zmail-TransId: 2b0663c9fe19ffffffff8dd475c6 X-Mailer: Zmail v1.0 Message-ID: <202301201036092738081@zte.com.cn> Mime-Version: 1.0 From: <yang.yang29@zte.com.cn> To: <mike.kravetz@oracle.com>, <muchun.song@linux.dev> Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <sidhartha.kumar@oracle.com>, <akpm@linux-foundation.org> Subject: =?utf-8?q?=5BPATCH_linux-next=5D_mm/hugetlb=3A_replace_get=5Fhwpois?= =?utf-8?q?on=5Fhuge=5Fpage=28=29_with_get=5Fhwpoison=5Fhugetlb=5Ffolio=28?= =?utf-8?q?=29_when=C2=A0!CONFIG=5FHUGETLBFS?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 30K2a7LV064230 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63C9FE1C.000 by FangMail milter! X-FangMail-Envelope: 1674182172/4NykC06Mgzz508D2/63C9FE1C.000/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/<yang.yang29@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63C9FE1C.000/4NykC06Mgzz508D2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR,UNPARSEABLE_RELAY 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755507874908571387?= X-GMAIL-MSGID: =?utf-8?q?1755507874908571387?= |
Series |
[linux-next] mm/hugetlb: replace get_hwpoison_huge_page() with get_hwpoison_hugetlb_folio() when !CONFIG_HUGETLBFS
|
|
Commit Message
Yang Yang
Jan. 20, 2023, 2:36 a.m. UTC
From: Yang Yang <yang.yang29@zte.com.cn> When CONFIG_HUGETLBFS is not set, there are two problems. One is implicit declaration of function get_hwpoison_hugetlb_folio(), the other is get_hwpoison_huge_page() is defined but not used. Fix them all by defining get_hwpoison_hugetlb_folio() instead of get_hwpoison_huge_page() when !CONFIG_HUGETLB_PAGE. Fixes: 92e109a2c5a7 ("mm/hugetlb: convert get_hwpoison_huge_page() to folios") Signed-off-by: Yang Yang <yang.yang29@zte.com.cn> --- include/linux/hugetlb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On 1/19/23 6:36 PM, yang.yang29@zte.com.cn wrote: > From: Yang Yang <yang.yang29@zte.com.cn> > > When CONFIG_HUGETLBFS is not set, there are two problems. One > is implicit declaration of function get_hwpoison_hugetlb_folio(), > the other is get_hwpoison_huge_page() is defined but not used. > Fix them all by defining get_hwpoison_hugetlb_folio() instead of > get_hwpoison_huge_page() when !CONFIG_HUGETLB_PAGE. > > Fixes: 92e109a2c5a7 ("mm/hugetlb: convert get_hwpoison_huge_page() to folios") > Signed-off-by: Yang Yang <yang.yang29@zte.com.cn> > --- > include/linux/hugetlb.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h > index f14a6bd2a6ed..9189cc359c64 100644 > --- a/include/linux/hugetlb.h > +++ b/include/linux/hugetlb.h > @@ -417,7 +417,8 @@ static inline int isolate_hugetlb(struct folio *folio, struct list_head *list) > return -EBUSY; > } > > -static inline int get_hwpoison_huge_page(struct page *page, bool *hugetlb, bool unpoison) > +static inline int get_hwpoison_hugetlb_folio(struct folio *folio, bool *hugetlb, > + bool unpoison) > { > return 0; > } I believe this issue has been fixed by this patch: https://lore.kernel.org/linux-mm/20230119111920.635260-1-arnd@kernel.org/T/ which has been added to mm-unstable now. Thanks, Sidhartha Kumar
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f14a6bd2a6ed..9189cc359c64 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -417,7 +417,8 @@ static inline int isolate_hugetlb(struct folio *folio, struct list_head *list) return -EBUSY; } -static inline int get_hwpoison_huge_page(struct page *page, bool *hugetlb, bool unpoison) +static inline int get_hwpoison_hugetlb_folio(struct folio *folio, bool *hugetlb, + bool unpoison) { return 0; }