From patchwork Thu Jan 19 01:10:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 45555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp73537wrn; Wed, 18 Jan 2023 17:17:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXvAHnN+shB0X21VFjjlqQdJlsSGhpXmNVSPZBbV7YKAcAbyp19uGQoWseywK2kZdBNz9iNR X-Received: by 2002:aa7:cacd:0:b0:49e:20f9:4ade with SMTP id l13-20020aa7cacd000000b0049e20f94ademr8998931edt.10.1674091025575; Wed, 18 Jan 2023 17:17:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674091025; cv=pass; d=google.com; s=arc-20160816; b=kIg09vW7yFPLpvBfr6WrM3FTTXoUWOSUAdvrvh+ZQ1dbpENZR2qeDrTmTOJmmGL7ZJ dn05+pDCfjWN8H4c+t1le0v85hmT/7Ili758Yv4Uo9ZDIdIoev73Fn80a4MjaRZxXTN+ VdWSd2GeBFeX9xwqKXoFroJTzoSm19vkkUkkSWAznL14ZnNQPgNeW7w8/UlTyPSa8Hcz gz7RnBhZz+RkQdzxt2WtQ4BzHw4uB15e6afqySQShXDzeP+aNISimSlGYkDTyXai21rw LyrTzI6mIc+Zn5XFIKnK/j/ilG/b+wNQdyanY8/9aTQetSFc8g26CFk+WhQo1GsGgVxa 0tzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=KfD1m/lxUk2pxmFXPAi9alNjoQft9LApRNq5lDsuNzI=; b=CXCwUzLwQRJtWYnd7l1eP/afVPbIskVwURVO8wItbg99Vdbpa97os5qWe0GFJ2wmEu OYhZEqoe0NF0bnYRcftiGbF7bjEgEMhBVNB/t1mdMxG9AxRUgEBeC4A8wx6g3909fPN/ BuUwPuDqvZP3OHyv8EKbxur70Nesnzcztns29159M1GccG7ljiuKF7MkQ+bqAeTuylu8 Y7qYDPgKDMKePDeZ/fgn/przOxM07clPz8CI64Grvv4wjLnvgCdp8etMDqhfpyuTZvrK eZTYq2krR437t6iiAsjzRPG6oLsLatiqq52J+HKBLWBbi55fTYMS5KH32FpJIq5V65mh Uy9Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=AVNwSCyz; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=oLeI+hNP; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id by16-20020a0564021b1000b004969286602esi26378332edb.392.2023.01.18.17.16.36; Wed, 18 Jan 2023 17:17:05 -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; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=AVNwSCyz; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=oLeI+hNP; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjASBLs (ORCPT + 99 others); Wed, 18 Jan 2023 20:11:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjASBLf (ORCPT ); Wed, 18 Jan 2023 20:11:35 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D32EC683FB for ; Wed, 18 Jan 2023 17:11:34 -0800 (PST) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30ILmotE006826; Thu, 19 Jan 2023 01:11:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=KfD1m/lxUk2pxmFXPAi9alNjoQft9LApRNq5lDsuNzI=; b=AVNwSCyze6RQe02EJE0I1IAgt3pyedTX4biFVZJCpmyJusoTXR09KMnk3yvRo8Im/aQy vyXEYpCkMgk5DaPUHt4ET38r/md7Omvj3kaYhgTjaYqzeRoHycAGBpTDDBkipdzwudnr vM2CsbrWjOLCkCRJi2gwu9k92frSUrpf0v+gvOkqQ7hSW6/12z7VsLRonUe9VEytITO4 fO8b7qGa3kcl5aaOCKudcpmvU9w/aLq3NQrGpJDUR8qKiCnLs2xocrhPXQczRhkhNVTO WFL5/mqNYaj8ZExACEIvgJJKNOPB8UC2mk4YzmOo1bumUY35KYO+ZXRzkC90DKrJUbO5 3w== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n3k6c91pr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 01:11:06 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30IMpfsD039584; Thu, 19 Jan 2023 01:11:05 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2173.outbound.protection.outlook.com [104.47.59.173]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3n6r2tqgnu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 01:11:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PLI247Y1Ej8uHB0TEeTwO6EtI6HT4gEhVQ9vbFziIF2oZ+0+HxY6IIZjA9bb2YcTpGwLPjr5yTJAhtWJIBfCeWCAvq3mvUWsHPjeUlFY85gGJR073VHg9uqsYOSCoKC29xlViSKdYxomqcxwYq5Ij4FMp4R7UQlmCvjvxdqyIxosDHI7qjA7o/BVp1VPic8/QU836RTWx7fWDMBnWM8WmWBF0MmpeZ9ajuq1jZyoS4tABN+lqtyB9Ys5i8A/eoMGrwYZyVJHkc6s62rpDVKHPHimWoB3TXklo+jxHAGuBycp5eV6VPRoHTJJYqLEmFrre0a+QVOvWuV3jAgLzMgBAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KfD1m/lxUk2pxmFXPAi9alNjoQft9LApRNq5lDsuNzI=; b=A67h7hU6m3L7Dm6L2BwUzQ+Iu3sGjeLlUfVzJhnBUqfJF67KyGATcKouhiNsHklCO6KbEdCgGKxRod0Ft7UlQLML8GgaNgdTj1tejHsf09Nb8tcQcuAqf8AHkEINlgBzib9Tzjn2OfMjgXBo4OFj40bbmNNZEg1s+NQzN0kfODrrrU610gV9kt4GgXASd5QrkuC3HPyAZcl7wWdnwE8gyTtSjY/2bwnYRcHJZo9Hg1c8lAjuniv9xpOsccr71WxwjcatdShiEr6aXcKIFXPcSnpBUDaY+9JcJnXXb6t5NvECWVBJMCBN3RqvOilD7HGfMEvHR9XFgHrei8m9jBaRlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KfD1m/lxUk2pxmFXPAi9alNjoQft9LApRNq5lDsuNzI=; b=oLeI+hNPobzv1MILar3WirqC+kLRbXt0vsmQ1MrdMYsEe+Rq3b4rLzpUyCL6pWFoPeO7IYTudSWrgQ3zda7BS2Y9L0PsFTTQaoWaiJQQOYrik7WPJ1yippfIyxSHg21mikl+0Iks+bV0gmz7IiKryckJLHLX6OvU4+o/eHBhdG0= Received: from DS7PR10MB5117.namprd10.prod.outlook.com (2603:10b6:5:3a6::17) by MN0PR10MB5981.namprd10.prod.outlook.com (2603:10b6:208:3cb::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Thu, 19 Jan 2023 01:11:03 +0000 Received: from DS7PR10MB5117.namprd10.prod.outlook.com ([fe80::93ca:e22f:aa6d:94d9]) by DS7PR10MB5117.namprd10.prod.outlook.com ([fe80::93ca:e22f:aa6d:94d9%2]) with mapi id 15.20.6002.011; Thu, 19 Jan 2023 01:11:03 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, songmuchun@bytedance.com, mike.kravetz@oracle.com, willy@infradead.org, naoya.horiguchi@nec.com, Sidhartha Kumar , kernel test robot Subject: [PATCH v3] mm/hugetlb: convert get_hwpoison_huge_page() to folios Date: Wed, 18 Jan 2023 17:10:57 -0800 Message-Id: <20230119011057.91349-1-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: BYAPR11CA0103.namprd11.prod.outlook.com (2603:10b6:a03:f4::44) To DS7PR10MB5117.namprd10.prod.outlook.com (2603:10b6:5:3a6::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR10MB5117:EE_|MN0PR10MB5981:EE_ X-MS-Office365-Filtering-Correlation-Id: d22412c1-882f-485a-f2db-08daf9ba08ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QOF0TT89nRUmlf4PFbNGJwZiDhlzz8BR4SJUXPUAmn33yx3oZSkSPkntHrJY0HUSCBh5Gorf30dQleXLNnKhwGqlTPmezTn/ucQAnSJ5JqJWLDZ/XzE0EFnMtwBLIKTCwA9u/Tn8EQfWqWkDIHVMMBkuxKab/MrwUG1LI8eq4AgBZAog7IQdNpfhJgIalaCGr/KmtAksPBQofBmNRIjiECSGyu8hBVnoe8ZkHpRctwojiA9svkkFChUxJpErSdl8RB3RXSAOJzKMDnqb1ljpDjY/vrCqccBU5gbhGzo4MNtt9V+ltat3VyIZeJ8I5LwMhru/MuCWMP+PRoI6PzKWfm3NTcAhqaidwxoZIvKb8BxSK26rliPit7itMexjasxxNhCpNH1Mz5FROudZsfvDzaXcc9B9wV6WP+6/eh3+iK/huKK+r+25fb5NDSiOf/eehyw6M33Z9CAsgmJQdmKy832I+OkMTA2mBRuQHDJ89E7YN6bwCFsk67UlXN4TWABHLtYkTq0R8zeJaD14vzFRUCb9dBWpmPPl+4ZHeB4Lv8EAX3foxx9HCn00B7JO0I5QcWBc3ZeRxF9LLalRYIhPgLZ60UEhv/KAGpa28Yt7x/Rmse5W+HQhWibd2+U7F3usZD2N/uGmnF3MvuglBHjVrItLCYqueIoeRUQw0Xxw3WUjEKn1+ybDuznFQNaTgANx X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR10MB5117.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(136003)(366004)(346002)(39860400002)(396003)(376002)(451199015)(83380400001)(5660300002)(8936002)(41300700001)(8676002)(4326008)(44832011)(66476007)(66946007)(66556008)(86362001)(2906002)(36756003)(38100700002)(6486002)(6666004)(2616005)(6506007)(6512007)(478600001)(26005)(186003)(1076003)(54906003)(316002)(14583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: G3KcI+dSWPviAfLiXFp/1FeJWk4p3wv8Ng4zbLrDTrBq10yYpjMeeI2/8MrpJWnEHJibesxAJe9RNirHloe3sywKLwA10nYAsC8d1+8qw/h8Ce13+uta0egen0JlWPXANyPbmKbQ4PrqnluoIOLxMWdXjshYCZjgz3TKXT8HK+QjwR4qT3iNCcCzpp/GSSfNAQPoNo2NyBOiv3Hp1JWZPHp2WMrNTiDyMMlGyqh/v+/VOYpayRhWaKcCgpA8/qF0ZZ9RseCRDM0MH1u1XVa+N9LoUf29omr4zitbQPEKJa/QvB7crivjuZNjtHAhLnVKFgudgw07N5reyMlBZVFE0iOK229z11WBCmT5a8AJczQLhQWI2nQaS3883nD9G36sJ83NF5WRGOaVJtFpCy+UiyBkAH/3Y79a+IPwFBmAyUV7MJEn62GXqyjL7LDXb5N9PL0cBNBRIAoF+Ad4xi4GrmvdwUvVOZgwhUGll3foTpD4vqTvuyg3xjiwnSLsf966E5reg4hwtCT+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riginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d22412c1-882f-485a-f2db-08daf9ba08ca X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5117.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 01:11:03.4816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4YhsPgW7SqdYL8u85lhp4p5UJde0F2zdHbIoiE/X1Z23yhl6xubat01tb69OePY4D+qLnEIkTczD6/KILqmPJVaN6bZdkmpNsc+yzc4g0uw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR10MB5981 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-18_05,2023-01-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 phishscore=0 suspectscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190005 X-Proofpoint-GUID: iHeOGg1mEGvIModNHA2gr6yjz_zmxxfM X-Proofpoint-ORIG-GUID: iHeOGg1mEGvIModNHA2gr6yjz_zmxxfM X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755411671357313363?= X-GMAIL-MSGID: =?utf-8?q?1755411671357313363?= Straightforward conversion of get_hwpoison_huge_page() to get_hwpoison_hugetlb_folio(). Reduces two references to a head page in memory-failure.c Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Reviewed-by: Matthew Wilcox (Oracle) Reported-by: kernel test robot --- v1 -> v2 Change &folio->page == compound_head(page) to folio == page_folio(page) in __get_hwpoison_page() per Matthew add a-b v2 -> v3 Fix build error due to not changing definition in hugetlb.h add r-b include/linux/hugetlb.h | 4 ++-- mm/hugetlb.c | 10 +++++----- mm/memory-failure.c | 22 +++++++++++----------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f631ecc0419c..06eb59711e4a 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -171,7 +171,7 @@ bool hugetlb_reserve_pages(struct inode *inode, long from, long to, long hugetlb_unreserve_pages(struct inode *inode, long start, long end, long freed); int isolate_hugetlb(struct folio *folio, struct list_head *list); -int get_hwpoison_huge_page(struct page *page, bool *hugetlb, bool unpoison); +int get_hwpoison_hugetlb_folio(struct folio *folio, bool *hugetlb, bool unpoison); int get_huge_page_for_hwpoison(unsigned long pfn, int flags, bool *migratable_cleared); void putback_active_hugepage(struct page *page); @@ -417,7 +417,7 @@ 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; } diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 2d2a460472fb..d20c8b09890e 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -7272,18 +7272,18 @@ int isolate_hugetlb(struct folio *folio, struct list_head *list) return ret; } -int get_hwpoison_huge_page(struct page *page, bool *hugetlb, bool unpoison) +int get_hwpoison_hugetlb_folio(struct folio *folio, bool *hugetlb, bool unpoison) { int ret = 0; *hugetlb = false; spin_lock_irq(&hugetlb_lock); - if (PageHeadHuge(page)) { + if (folio_test_hugetlb(folio)) { *hugetlb = true; - if (HPageFreed(page)) + if (folio_test_hugetlb_freed(folio)) ret = 0; - else if (HPageMigratable(page) || unpoison) - ret = get_page_unless_zero(page); + else if (folio_test_hugetlb_migratable(folio) || unpoison) + ret = folio_try_get(folio); else ret = -EBUSY; } diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 0b0a36afd79d..eb8c3cf2ca36 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1328,28 +1328,28 @@ static inline bool HWPoisonHandlable(struct page *page, unsigned long flags) static int __get_hwpoison_page(struct page *page, unsigned long flags) { - struct page *head = compound_head(page); + struct folio *folio = page_folio(page); int ret = 0; bool hugetlb = false; - ret = get_hwpoison_huge_page(head, &hugetlb, false); + ret = get_hwpoison_hugetlb_folio(folio, &hugetlb, false); if (hugetlb) return ret; /* - * This check prevents from calling get_page_unless_zero() for any - * unsupported type of page in order to reduce the risk of unexpected - * races caused by taking a page refcount. + * This check prevents from calling folio_try_get() for any + * unsupported type of folio in order to reduce the risk of unexpected + * races caused by taking a folio refcount. */ - if (!HWPoisonHandlable(head, flags)) + if (!HWPoisonHandlable(&folio->page, flags)) return -EBUSY; - if (get_page_unless_zero(head)) { - if (head == compound_head(page)) + if (folio_try_get(folio)) { + if (folio == page_folio(page)) return 1; pr_info("%#lx cannot catch tail\n", page_to_pfn(page)); - put_page(head); + folio_put(folio); } return 0; @@ -1418,11 +1418,11 @@ static int get_any_page(struct page *p, unsigned long flags) static int __get_unpoison_page(struct page *page) { - struct page *head = compound_head(page); + struct folio *folio = page_folio(page); int ret = 0; bool hugetlb = false; - ret = get_hwpoison_huge_page(head, &hugetlb, true); + ret = get_hwpoison_hugetlb_folio(folio, &hugetlb, true); if (hugetlb) return ret;