From patchwork Tue Apr 25 14:09:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13223375 Return-Path: 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 AA8CEC77B61 for ; Tue, 25 Apr 2023 14:10:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4A6086B007E; Tue, 25 Apr 2023 10:10:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 456086B0080; Tue, 25 Apr 2023 10:10:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2CFD16B0081; Tue, 25 Apr 2023 10:10:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 198596B007E for ; Tue, 25 Apr 2023 10:10:50 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D0D57401BC for ; Tue, 25 Apr 2023 14:10:49 +0000 (UTC) X-FDA: 80720099418.09.D839C0D Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf06.hostedemail.com (Postfix) with ESMTP id 7C05C18000E for ; Tue, 25 Apr 2023 14:10:46 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=qSl09W8w; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=hovDSzQ1; spf=pass (imf06.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682431846; 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:dkim-signature; bh=aZS8RD999fUgHdsJnnn80kjdGzDf6FA1XiFSDSQtpFI=; b=5nPgWSI6SOKFn44LUjbG/FQkcCVTp1Ty4MITeQcYWLVApYP4ciSRNs1IrSBp8y2EPrIzDL kg5jN288BKsxYwtSzh6Z7HCW8nHK7xYjOc+BanVEOzQabPgqxzVtUt5Lnzq/2xv+kG6DOf d88/a65gFnZdaETZEtylLIo4fPCLo0c= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1682431846; a=rsa-sha256; cv=pass; b=laIsjUHwyMD30p0WZGQJgdgkGyqSfTCO/HEqsdg0IpvV+A1SW/I9TXP9XpQ/tpfd0X8wKT 4lHPcb36rxgy+LGTo8HaoOZaNlQbX4eKkuJJqbnKaXVQEkVNuvV2iu5q3Vee6RX5UTo/Jc VUz3ZHN8mLOsxPr69fSdYWf3AesQ9qs= ARC-Authentication-Results: i=2; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=qSl09W8w; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=hovDSzQ1; spf=pass (imf06.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") 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 33PDi7CU024310; Tue, 25 Apr 2023 14:10:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=aZS8RD999fUgHdsJnnn80kjdGzDf6FA1XiFSDSQtpFI=; b=qSl09W8wn8ygealFzlkj4JZX1Pz6E7GJPZMWyvAHJt/ow+H9QOcNxhgnBhcq66P5GQBW s/IXO8Ti51FPvKCsm16LAVlc0roQnQ725Ursv85tczGnPRzoRtcEcV5CLE1cv6UtVigC /+zi96+u7+8QcfhpYnhHlQBJZFPnpB4c4yeoJQZkPKgLLBSxsCimzsCsLUfcM7+0a0EO wje1NITNOYuDDaqDM8/h2qagBaWsVqRUj6muTQ+4j3qrpHHesohcC9OCWwJw9DUaYpqR Jg0MVE+Tkk/uXIciS2sWs7xL5AS6GzdU3sLxK2I8pgssRKoDcOfLi+pYKl6SvF/ETnz/ Tg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3q46c45fup-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Apr 2023 14:10:45 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 33PDXeU7032632; Tue, 25 Apr 2023 14:10:44 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2104.outbound.protection.outlook.com [104.47.55.104]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3q4616qsny-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Apr 2023 14:10:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ginNR8HuvBZAVH04OcErruBgsBGzEYbAZ+EOiZqD3JxH6lE7mcl0P7XPqRVUx/Bf5+j97lEpqhuWlhB7CMy07zszG4p1Y4+3kXACU/EYXvK0vF0v+8I+f9/X/FNx/TbhahISU0DaXxAvaLrEAhrw5kwBy+SZerT1AAGnipsOKr1B/sKnN/R1hXr3eQFp2TB6IiMwYXGogCbOlIIH3bAEIbyhazo+ARXMD3ZK2b0SswqNH/TtOCBm6gXgeB3H4xnNl0MOYKG1ucZjC846F6oNBfmGD57NhX4X3BYTa+RGxAdg/wQJ5Luu7AEgN7JYe9mvoeo7lDEF+xiS69xOqa0NAA== 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=aZS8RD999fUgHdsJnnn80kjdGzDf6FA1XiFSDSQtpFI=; b=dtX11oAxCfvddo2Ll2Jc/Q5Ik4rZ21Go0dbzL2881/DUhfe6pxM6Ulb8B6ey+N8SB6plCKsnXq4NEpcsvD+6BL9fwX+7zM6giy193hGMemDeaTUTH+7eI8YAFq3mpnCHEsNm4Uv/oXdsflgcmDunyfGBKeYmPfStkgX3qiDExTJcwxh6is0pWmj3xoHz3YUYfDn90EVE/ENWdHA030DDv/nyF4hMAoxUliCcDn4NgQ/lbWwbZK/w1TnHbAWoLr0ZlxLQBmb+1yb+vRAlD+PlKwiXDQr8fcWNIiyvDEHQIIhDKVdjQVX1rzVGfTVAKuxR5IJsKlme7SMsCn2xLvvJnA== 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=aZS8RD999fUgHdsJnnn80kjdGzDf6FA1XiFSDSQtpFI=; b=hovDSzQ1v8EhmDQ1BJk3ZjZbiql72Uq8Zj+WmFgVsiIbr6jjeus3paq1PFRAJ+vY7aFfARYRGjKhYId6ejJ3hegQBjCyaAxo98I0VtCNf/o3SmM2pDLdhIfxtPxng3Bajk+vIAqTfV7KgWWgWGe4GcW+9OvvWG4iPqCv9E1abt0= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by CYYPR10MB7650.namprd10.prod.outlook.com (2603:10b6:930:b8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.34; Tue, 25 Apr 2023 14:10:42 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8bb9:2bb7:3930:b5da]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8bb9:2bb7:3930:b5da%7]) with mapi id 15.20.6319.034; Tue, 25 Apr 2023 14:10:42 +0000 From: "Liam R. Howlett" To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, maple-tree@lists.infradead.org, "Liam R. Howlett" Subject: [PATCH 10/34] maple_tree: Use MAS_BUG_ON() when setting a leaf node as a parent Date: Tue, 25 Apr 2023 10:09:31 -0400 Message-Id: <20230425140955.3834476-11-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230425140955.3834476-1-Liam.Howlett@oracle.com> References: <20230425140955.3834476-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4PR01CA0103.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d7::28) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|CYYPR10MB7650:EE_ X-MS-Office365-Filtering-Correlation-Id: d93acc99-006c-44ba-535f-08db4596db06 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sdJzv/Ff6UGp12bjuFdwmtH7FPD6WH7Cdb1Qi7UsoUGDmj/pYcKeDWGAGs+RpvlQGiXzo/uUuWDOYDDPiPDu3V+QjzXQULWGvBNAaHLUe1K+n0Sdvzx4F05xVH9xq/juUIyuGJp5YmGN3XewqBMaHHG3WPt+vbqBlED+mDYeZPF3rSgNLCGPp5GzJCePfaYregtI56W9Oh3cjKaIfwEtK0DPj4u6VkvnT3vz7U3oRC+EPmqLeioudsL7Z1DuDT4fGDYprQ1oME2Mr9Zjh+2tcNUO1dNU8QFm/fNQ6hoqGOomLSpfL5dZpadapXM/0/XvzNWAn1wz2a5PDiAEV/sr31DpFJuKNGllKKqf75b6bDmBNCciqTGHocT4s2FzxMvsgZbi6OhB2c5rRMa6gt/6mtBN22eEoVmKn8vslDbnHtmbHuuBpgoGtR3e30zZQpohwiqOKssCO2AjABsgFPVJ2xH4LrHXEEad5M9j050zhAwXwO5sVMz9S6G23PkUbKfRSdAHjUUakZtDoAcSAOzsjsIayeXWqvqe6eaGQvHzSrgVLqTBP+wu0L1/QToy5mZo X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(136003)(366004)(376002)(396003)(39860400002)(346002)(451199021)(316002)(6916009)(4326008)(38100700002)(41300700001)(5660300002)(8936002)(8676002)(36756003)(86362001)(2906002)(66476007)(66556008)(6486002)(6666004)(6512007)(6506007)(1076003)(26005)(107886003)(478600001)(2616005)(83380400001)(186003)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-Ant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jxkNodbdNUV4qSaw8Tg97NdbFUKCUAkcmzvH3C2MkwjOeChGimtHa4zNyT8+sOs2ZjyVhNRtiFDCuqoZ35CWPG/950j1voYL/tN7YtOy2+9pheL4o9YQAcr5LeAvTrk3a2rKw4ndK0KY4lRO8u8JM/am5khRnWWGXWYrI2NjnWfrw8sxNIkfVT9vZLPM+5DEW0qRsWr/SFlL9yBtAW7k6pkgJ8TwHJcTw9BJW2uxg/CJaT02veDiXQtb4HrkBXk7cjD6zMePU8G0BRNjTgqt0DaCLCwO9jubwJr4xx89MLsJUH8zIOaWzJMBZBmx8+UDVgfYry7HnehEpEmCJMYOGBXB6kHvJXJuJQsQnmMBplkypqnh2SBopSZgEEPCWBVOoZ2zFAzPiv8VgnEVaavU7VvaGhzBuqR3oVmcVy/cW0R29rptw417WIbNjKhSa26ZhhjCGyBopMsMt6FI55zN9HAsAQHPqyx9oAaxKs7Tih9Z8QJRhmm66Dw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d93acc99-006c-44ba-535f-08db4596db06 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 14:10:42.6032 (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: LSOynljhkeLzPFG58VUq3pVqNF6RNcjAbKMqlKlWLuBiN0TSKeIgdr4aB7s9VLteKasChsT7/Ki5RIyDrQHdvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7650 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-25_06,2023-04-25_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304250128 X-Proofpoint-GUID: OHm_kFK_F9__pGBtlMlXIDF6DwxufVgl X-Proofpoint-ORIG-GUID: OHm_kFK_F9__pGBtlMlXIDF6DwxufVgl X-Rspam-User: X-Rspamd-Queue-Id: 7C05C18000E X-Rspamd-Server: rspam09 X-Stat-Signature: p98i5yczr3ko4u53owm8fy4s38ecdqna X-HE-Tag: 1682431846-49818 X-HE-Meta: U2FsdGVkX1/sCN3XAZrqSRaYHy4qYdh4Vwbu0Ojm08xBHwIrtvvM1WVWg85tgVzOF0H9DYreYKJcUTMwNS1uxHaQW7Dge0flk2JRrzbQZ0MB26uvxurlAb3gJs3I3oDzOjMuRNPVH/nHUydDkbwiuDPy/6PP5APoTWOA0K3xxrCeHQPrHvlFi5BxRLOYnrbKqpbV5QFrk8kjzXaYin3s4UalGCYSevEzlpr9Ptl8rJRvY9rzf7HgVqN3iyMCoP+K4UxMyTP21pZTgMlhvn/fsgRGfgh8VAibLYdXKq+0TNFlVYOV/hH4bDAQ65LXgjTkGMKjxIMjQ3qY00shtKYwLXLMP7Db1EvnNFd4GQPD8Axip/0TFNN90X4odbvuiM+h86SHlWhawDzFao3Bl4zFtM4eu8udeF7fT2JLdJYuQeL3PWqS6+oz//BkdoWo7x7dKqtKCmkb+kGcr27QSD1n/vZcqFt2dlhfGNmuc7dB/yeVlxiO7Z4gLhG/c/tF6V2Avxy4xyzzvohjMXA/CxsCUYiW5m+ZaPKl0CTmxSyVmWByTMygSaATnZ3NasffQ8CkiWRQ6y5UdRX6pGzGEjrMY5QE8J8zaRAD2vZo53siuNBGMTn7902zl8lcXYZJGVUq9X9Ph+WwUtSOKGL9GQ2o89omi19b65nYiy6nRJu2nJthJ3Z13g2JjN4dezbc8MsHel7TG5QAASGuzr2evtV+vBg0Z+Zxou0WAUMTQp/HcC8jDAv0IcZyfnlegWb0Zu1+K8AWRvRYmqDrCCpLX4xzFNGNfgRU06jOY6Za3OhEQ8EWtHIKslB4quT2GEutXHCUYWGfUdM+hYvZZEVzgSoVdRQ/F3rc1yVKQIxHvhjWqZDFyka1esHXc9VW/7SVck+Spw3biuWjVAAuFaGvbnSwKCU584WAs1Lc8mGeFcfzPYIs/r75pfzVHHR0+JUyAtCKWTTDIztz3MDhY/oeoF/ f8uhn03m T0NVRM/UJq+FfFh3WVCKG4IIKuZnwimhjSKp+ZndjzRlnQ3i/2W/h0g/qB5C5X8souy+PY8nrvMJSOLe+e1v/Ezb247N5mCAb9YW7zKN3pMjQGtlhPqTy6lBlRTq9VpM6iXERyRNaDD0sA8wEILDzF9YbDkSfMszEsW4JeURGqkoKsZhGs6cEENqhuSz61EAiQ4CakJkI0N9oc8aoHlKfwhsmy3MIMcyVvS8pvIimITp73AW2WQQn01tRjNdwJUXRsdO9+QJj42QmZZWWiCZEoCjHjlg8jzfLLljXBTFdwoMeEHgAJldKWYpcRjx5SnpHj1XKjN7FzNpVVYdQ2hgTT2I5XI4w+llIKQViUiCK4JekBRvFHYO5dhOEHMcP90LqXKsyukgQ0HzXLJtW75sUj2JkCNl20fNMfNexLZxJVwVyotQ= 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: Use MAS_BUG_ON() to dump the maple state and tree in the unlikely even of an issue. Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index d22a337e9cb6b..441592be039a2 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -453,7 +453,7 @@ enum maple_type mas_parent_enum(struct ma_state *mas, struct maple_enode *enode) } /* - * mte_set_parent() - Set the parent node and encode the slot + * mas_set_parent() - Set the parent node and encode the slot * @enode: The encoded maple node. * @parent: The encoded maple node that is the parent of @enode. * @slot: The slot that @enode resides in @parent. @@ -462,16 +462,16 @@ enum maple_type mas_parent_enum(struct ma_state *mas, struct maple_enode *enode) * parent type. */ static inline -void mte_set_parent(struct maple_enode *enode, const struct maple_enode *parent, - unsigned char slot) +void mas_set_parent(struct ma_state *mas, struct maple_enode *enode, + const struct maple_enode *parent, unsigned char slot) { unsigned long val = (unsigned long)parent; unsigned long shift; unsigned long type; enum maple_type p_type = mte_node_type(parent); - BUG_ON(p_type == maple_dense); - BUG_ON(p_type == maple_leaf_64); + MAS_BUG_ON(mas, p_type == maple_dense); + MAS_BUG_ON(mas, p_type == maple_leaf_64); switch (p_type) { case maple_range_64: @@ -1741,7 +1741,7 @@ static inline void mas_adopt_children(struct ma_state *mas, offset = ma_data_end(node, type, pivots, mas->max); do { child = mas_slot_locked(mas, slots, offset); - mte_set_parent(child, parent, offset); + mas_set_parent(mas, child, parent, offset); } while (offset--); } @@ -2706,9 +2706,9 @@ static inline void mas_set_split_parent(struct ma_state *mas, return; if ((*slot) <= split) - mte_set_parent(mas->node, left, *slot); + mas_set_parent(mas, mas->node, left, *slot); else if (right) - mte_set_parent(mas->node, right, (*slot) - split - 1); + mas_set_parent(mas, mas->node, right, (*slot) - split - 1); (*slot)++; } @@ -3105,12 +3105,12 @@ static int mas_spanning_rebalance(struct ma_state *mas, mte_node_type(mast->orig_l->node)); mast->orig_l->depth++; mab_mas_cp(mast->bn, 0, mt_slots[mast->bn->type] - 1, &l_mas, true); - mte_set_parent(left, l_mas.node, slot); + mas_set_parent(mas, left, l_mas.node, slot); if (middle) - mte_set_parent(middle, l_mas.node, ++slot); + mas_set_parent(mas, middle, l_mas.node, ++slot); if (right) - mte_set_parent(right, l_mas.node, ++slot); + mas_set_parent(mas, right, l_mas.node, ++slot); if (mas_is_root_limits(mast->l)) { new_root: @@ -3337,8 +3337,8 @@ static inline bool mas_split_final_node(struct maple_subtree_state *mast, * The Big_node data should just fit in a single node. */ ancestor = mas_new_ma_node(mas, mast->bn); - mte_set_parent(mast->l->node, ancestor, mast->l->offset); - mte_set_parent(mast->r->node, ancestor, mast->r->offset); + mas_set_parent(mas, mast->l->node, ancestor, mast->l->offset); + mas_set_parent(mas, mast->r->node, ancestor, mast->r->offset); mte_to_node(ancestor)->parent = mas_mn(mas)->parent; mast->l->node = ancestor;