From patchwork Tue Apr 25 14:09:23 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: 13223371 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 83C75C77B61 for ; Tue, 25 Apr 2023 14:10:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2AA8E6B0075; Tue, 25 Apr 2023 10:10:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 25B816B0078; Tue, 25 Apr 2023 10:10:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 038046B007B; Tue, 25 Apr 2023 10:10:33 -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 E38AF6B0078 for ; Tue, 25 Apr 2023 10:10:33 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id BCAA5AC907 for ; Tue, 25 Apr 2023 14:10:33 +0000 (UTC) X-FDA: 80720098746.02.5E0FCCB Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf21.hostedemail.com (Postfix) with ESMTP id 55EF81C0007 for ; Tue, 25 Apr 2023 14:10:30 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=a0+PAvCL; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=mVmyAEmI; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf21.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682431830; 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=p8bYlVicQX60f75L1bnEUO3IOESeVNSC3YS+Zx2A1Tk=; b=NC0PP1BR5Up3u+ZxQrWtTTRxL9dxNKRuCtFWXprECxLcLyRtngVG848Jk2oHuT1fmKYCqT 6VgbLj4lcqdOxvlOKuY4sIC1PV8yOOtSImn3HwFVMUinwFQCO1WdOexxU08BgpnRKJy94K DgL97W7mxqyBkhNbr/I+lub3nosZ2UE= ARC-Authentication-Results: i=2; imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=a0+PAvCL; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=mVmyAEmI; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf21.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1682431830; a=rsa-sha256; cv=pass; b=5dSab00U4tmAHKok6lMbUoTN48Ct7XIVRq0EenFAtL/ICHjdYh/dM8YdVf7hEmvJT/9xgk vz/HF7taolw/gr8DNfQsRz1EYr0aiPgSLtNsFSmaHvLzXT+3Q8qTmMsjDNCN0kqQAK+Ftz fEhq9AMHFjPyDyaxBJCiLgLnFYeWNpQ= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33PDiYpM022658; Tue, 25 Apr 2023 14:10:27 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=p8bYlVicQX60f75L1bnEUO3IOESeVNSC3YS+Zx2A1Tk=; b=a0+PAvCLqVGO12lOtnY6YW3evh7AjfNdXSQ7u0q5uAOIfsDhEgFpubv7UU9IjkTmIRyg kOOLHptlyObOO2cdV3wLNglmqov4t4B40YpD69xJ+ivQbaeNFa4VW9DG89ux1tsA6bgN aJZdGvT9qGPanvuoO7IIDszI4Y/FKvmaXhTWUZFeae7ojH2I2WBIXsGduv7+QPkFmLhF 7kBBmSyKcTKAEGXnGftTZkQD0OeM+ro6OjbvEBZa2FMqc3MMTCe6otDJobh9iOnyuquw 3bjbxc1t8ZRbHLCsdCCrx9x5OpkBzAUDf3GAsCnX6ftZKqVD4r+XcoGzGxrngZwXVb78 rw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3q484undrh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Apr 2023 14:10:27 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 33PDSKCP007654; Tue, 25 Apr 2023 14:10:26 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2177.outbound.protection.outlook.com [104.47.57.177]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3q4616gcp7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Apr 2023 14:10:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=huN2vwlftAx7dUnrkHJxW8vADu/kqzmgrXdeYubBGPpDbB0AfeLxFC788CMs0u2Tyzz7wopY/kSBEo2Shr2WeHL5rM7SizoaWSuIuefGLbp0JbcIDi7IUBNzuhmcsrEhkQ9UQwRprfoTC3zNo8xNQAs7Ppl68IfLjCR9NpLfRtd7jpzAUBwCBGPo5zAp6keLhwQbOfNRgqXyMH+8bHxpzWiNGIf6XzdElMXedyRyVvzU4RHqCg45pLsDN43QHi+VBFmax/9vAsQnF7bn9FLK2q+19T1Du4ausG6Np9nzRThb/GVDwzF+GEJsj0oNHC/hzKZmLbEL6jNg6tuKDoerVQ== 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=p8bYlVicQX60f75L1bnEUO3IOESeVNSC3YS+Zx2A1Tk=; b=LzlbIagqO8CNwzO9e7cYDHi3e+Usey20RFwlHWehuWfniYnHDxbZWAqP1nQSgrq3bELFc9vBl+EcAFOKDVQfMTkB9FZ53AsCljhyEW275Z1BJE0u+u18nAT875L4A/AriRqLwDOY05ktamgn6XXjltEHE2VY1fpqdpTT8yzm21mlf8/UUK6oEADXiThw4btEw2UQmHmREtXDPs86N40Xm3pP3pzQh116CWy7W5HNrA1Xu2xGMb6iuJH4lzCuxwQLKrzUmglSx9F963V9X9fPkvoRnOchPTj27/2GDEjCblohFrb8z3r9N1sWSCalHyQXHoYIa5QLMic4Tz+P+qfvAQ== 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=p8bYlVicQX60f75L1bnEUO3IOESeVNSC3YS+Zx2A1Tk=; b=mVmyAEmIdO3bhQ+uziC8cS+XIeanSbjiVDZzMSeZQTWqJgu56qV5xfTYaGKxutz1VCkkbEhacFDxS+MNqF0JJhFAZX9HEz1gEGJNSJ2X5ZI9saSXsma/ZIbXSRRsQj4N5A7o5l6nCJRN/mwE+Sp2GH9W50ld15eMl78PU8tiyx4= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by PH7PR10MB6081.namprd10.prod.outlook.com (2603:10b6:510:1fb::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 14:10:24 +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:24 +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" , Wei Yang , "Liam R . Howlett" Subject: [PATCH 02/34] maple_tree: Clean up mas_parent_enum() Date: Tue, 25 Apr 2023 10:09:23 -0400 Message-Id: <20230425140955.3834476-3-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: YT3PR01CA0108.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:85::25) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|PH7PR10MB6081:EE_ X-MS-Office365-Filtering-Correlation-Id: c9f6cae1-1b02-44ad-540d-08db4596d010 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NvmkUF+okBTuFvhmt1zxExWSbMZVI3hSg5z6PlRwAlYMXp8bR9M6C54PQ3l8YJeYt4gdvIkuRWSeChLS0bgrx4kbRzTmvYWG5vk5NZPa36xzjo6v5Sw74eSvhetvYOpF8ayEk9fBtD1fRWo7YuXXqhPqw3Q9PCKH0eZLRxxmEa+eTZUyTVeYEBHDeUn0cqynjtELmGANfMcFCTrrjiieTWot989M2BNmQFcVwcbXwVJwG6V9nAnihMAZmhjblC8+vA5toWNIQn9rzhR6PjhhhoKLtEUUkvUQIk58wPqzDMTFjTvEvT/H3YK0OxfWpfQWfje6f9qzZcdcAmam3qZyBZojzp4kIcvbOmsNvfYgrbkSKKvU5ihlwNY2QSruIo0/sykj/RpJoOG6Yi7w8np8Y3AFn0q5TnUQ32vGStxNrp2rH8V3anoCqjSKYhcYDc1aEmavKq+HyUH6H0ERD+Qi729BE6/tBcG2qLSI9a8qi7wfDfA+/oiXmmQv0cyARDdrlQyxACE9oiw36Xw5JidvoZ6jze+VV7TaTdmYNL2Dxl86XwOrgOnBoFjmHS3MgSZY 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)(396003)(39860400002)(366004)(346002)(376002)(451199021)(2906002)(66476007)(66556008)(66946007)(6916009)(4326008)(316002)(5660300002)(8936002)(8676002)(41300700001)(36756003)(86362001)(186003)(26005)(6512007)(1076003)(107886003)(38100700002)(478600001)(6486002)(83380400001)(2616005)(6506007)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam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D2pm/5DZb/JelbtlFmkcf3PnW6bNrI1PGPUwNoaRzd6vDTtXFkSLB0lbIXIipncPCuOl5UNmXjumcTjjNdafojDaS4K657YRu8SId8dHolZgGxiJ0n0iWWtyfHoiE503Ypzaew87kcl37C1uWooItxJP5Xq6jZseovkllZDdmaUxPlR8ZAQDNmYawJqJrisaTNGzj44Bcz8iqmz5ped53WZaM3vbw+4ubM5ZqOcjw5NegjYs+tP2s/+dvFDFH3c4la0sATd3a5bbfVQEE4uHOBSiSMZRm081L6v3LXLUUj2t9h5N1Hro1vnF3cYDe/0nCfHfg0F7NpY7BT1K+XwGkCL2Fcd2nXD2tHlhWYtrUMc3DDxq7NdTfWTCe7DLh6lS0vrzvvahZyxkof4bgkQlquMJntChF0jtJ3sjZlwy5pmwpwNCJZFoy0CxK8lPBwizGr20pHacvZnrDxLYGeanvE/Mkpig+TnHfSO0QnS4s7kUNcvQsViW77dUhCHALkwsiexhI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9f6cae1-1b02-44ad-540d-08db4596d010 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:24.1920 (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: ALcmypgBA/367MnkhrdBJA1PxQuU12uRnhlt5kzYAbjVCwyjaThEaNtcavaZgFY7eyRMcMc8Mf1YfkEbv/YvBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6081 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 suspectscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304250128 X-Proofpoint-GUID: bptD89mFRTTn4pZQYcbisEMX_Wg-6fqM X-Proofpoint-ORIG-GUID: bptD89mFRTTn4pZQYcbisEMX_Wg-6fqM X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 55EF81C0007 X-Rspam-User: X-Stat-Signature: cbeu766ytr5puecsnh8y4ki7xz6g7pzp X-HE-Tag: 1682431830-341389 X-HE-Meta: U2FsdGVkX1/9wWySLlgnAshZ+3v98GnXP2VdyqTl03W1LGnQ2Hs3AVkncY33gPyM4IqdVOkbd0JhE/OM4UBdmzpTAf8UYCAJoOY7k2+VBXLV2y/2yKSPuxuOtT69+9D1BZsT/iaxUP7dlj+wvNHYQ1eIMrwoYw5aILCiY8ovmA0OxVAIGgh6l2moXC+PgfTbdW/rycbkAHFMJh8Q59/r/ZbiRpQGH4WMJ+DLRe92J3ETCwW6GHVCAOdKsTz74GjD+sBSrbpulbVGKNHWJ56Kv8yY8GTIs4XNUxxjHafUHR9l9sb0W49lXMXBc4sktumk9YuCsIAZOh4034fGT2Yv7E8CVa9lBwv8rMpspwLxF+nu+d6XPwcIlmMDLYf1yWpegwipJFunvnYNImJlbT5LOrEzNIFUnGeVuVMZub828GNyC9icoOLAvNLyuemSYjkwKPKrEL0ZufUaELch1oZquVrQNlVZWBdAwNKafM42ohgIbKC7qMI8Voe6dBEPTS+OZR7piEMJ4ckSm2kxHNFQWPXq90HIqqTkn0dgQhJINt6/yQKq6Sebi7dkFmRfmetFmatP6tJysVe9z/1GdhugWKb9l/Q4ntSaeGY0evMvv61A0UwPGoYooSerckiAgyHFQY1312n7gcHf6CS2bVG15tK87I2Cvy3p2nJJk3FyssCnvEGdGodt6ar/78ZK64V909HQArJgWPGYH9ByM4Nt5UyHenN/qsvtdE33Ese8ccmm9J2WlqHEkgrIFKjhS37ljqDF51UxrbKtUg1SldilXX3+A7MDOWR/FZn5a+dwbVpqWCc+KuhqlfvxBefLC2CrELBdcR4EhEP5PmnlB64IP8UvmPnDHd4FDo0spD/BlVs9/SiwY1OqJ3rNdwldAnENNJu/Iev0kBrip0+UkDZNmXkO/5lkA2KKU5wuDUTdCF0j9yiP47knM/ZEBnkF3zsfWzvfJCcY1Qf/qiMp7Jx 96R5cEg2 O6yhc5/WOzduoZM8KAO3TD8oYY2QbTSoNLu96IdZPgn9aPMrGXUvYAa3kI29tf6a/hfg/Wqbwdft5K5dfZ8EVr5Y7UcCV7+7R+UYwEA3qCO+f3YDc3akEvxr5YyB/VqfA+3rTa++SkoEnJZ9X1R3V1ZvZBE6fgJOXXjdtVwRLlREmBoW7WdJtzGRbJNMToyJGxAKzZDcQj3PXEjTrGyCLgcHmlZO+uWHEWdZShfy95NHTBvDLYt1cYlCe3chcXWukOL/yQtK7bakEV23D+zpuc/5ktqTc7GnstXUhwXFTCqZ211GzfKk2GYy8H77X3Wpc6UAfC2QHCSGsjO89D94DlcvH8xVpK8JEQhDzqjPUSlGWS8zOpmzUbRMQVs+3SasMgrCNacPSn3+l6FFWTHN2o3//E3OZOFAPrmkjKWbUCJfS9n6Wo6dnOGxyt9f1CNMnJuSLKO2k2DFOSJyBH8kx1SIsL0NV4QLb+SgyING9onqHnJC94ONjZBZfRPwuTjs7Bwba+9N1js/WCp4= 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: From: "Liam R. Howlett" mas_parent_enum() is a simple wrapper for mte_parent_enum() which is only called from that wrapper. Remove the wrapper and inline mte_parent_enum() into mas_parent_enum(). At the same time, clean up the bit masking of the root pointer since it cannot be set by the time the bit masking occurs. Change the check on the root bit to a WARN_ON(), and fix the verification code to not trigger the WARN_ON() before checking if the node is root. Reported-by: Wei Yang Signed-off-by: Liam R. Howlett Reviewed-by: Wei Yang --- lib/maple_tree.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 9cf4fca42310c..ac0245dd88dad 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -428,25 +428,23 @@ static inline unsigned long mte_parent_slot_mask(unsigned long parent) * mas_parent_enum() - Return the maple_type of the parent from the stored * parent type. * @mas: The maple state - * @node: The maple_enode to extract the parent's enum + * @enode: The maple_enode to extract the parent's enum * Return: The node->parent maple_type */ static inline -enum maple_type mte_parent_enum(struct maple_enode *p_enode, - struct maple_tree *mt) +enum maple_type mas_parent_enum(struct ma_state *mas, struct maple_enode *enode) { unsigned long p_type; - p_type = (unsigned long)p_enode; - if (p_type & MAPLE_PARENT_ROOT) - return 0; /* Validated in the caller. */ + p_type = (unsigned long)mte_to_node(enode)->parent; + if (WARN_ON(p_type & MAPLE_PARENT_ROOT)) + return 0; p_type &= MAPLE_NODE_MASK; - p_type = p_type & ~(MAPLE_PARENT_ROOT | mte_parent_slot_mask(p_type)); - + p_type &= ~mte_parent_slot_mask(p_type); switch (p_type) { case MAPLE_PARENT_RANGE64: /* or MAPLE_PARENT_ARANGE64 */ - if (mt_is_alloc(mt)) + if (mt_is_alloc(mas->tree)) return maple_arange_64; return maple_range_64; } @@ -454,12 +452,6 @@ enum maple_type mte_parent_enum(struct maple_enode *p_enode, return 0; } -static inline -enum maple_type mas_parent_enum(struct ma_state *mas, struct maple_enode *enode) -{ - return mte_parent_enum(ma_enode_ptr(mte_to_node(enode)->parent), mas->tree); -} - /* * mte_set_parent() - Set the parent node and encode the slot * @enode: The encoded maple node. @@ -7008,14 +7000,16 @@ static void mas_validate_parent_slot(struct ma_state *mas) { struct maple_node *parent; struct maple_enode *node; - enum maple_type p_type = mas_parent_enum(mas, mas->node); - unsigned char p_slot = mte_parent_slot(mas->node); + enum maple_type p_type; + unsigned char p_slot; void __rcu **slots; int i; if (mte_is_root(mas->node)) return; + p_slot = mte_parent_slot(mas->node); + p_type = mas_parent_enum(mas, mas->node); parent = mte_parent(mas->node); slots = ma_slots(parent, p_type); MT_BUG_ON(mas->tree, mas_mn(mas) == parent);