Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1375951rwr; Wed, 26 Apr 2023 14:10:47 -0700 (PDT) X-Google-Smtp-Source: AKy350YqiTTFEP5iDNR18YHGcJlt+cQMHh5bEyUNfpkLRWGE9NNkM7RMkJ66ARpB+eYH9pA31O5d X-Received: by 2002:a05:6a21:2d84:b0:f0:edb:f60b with SMTP id ty4-20020a056a212d8400b000f00edbf60bmr25285645pzb.20.1682543447034; Wed, 26 Apr 2023 14:10:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682543447; cv=pass; d=google.com; s=arc-20160816; b=R5s6cgtqPQFV87u1mPo6TI1r1H+UyfEO19YyRh3nZjO0TcBJMPf0fR5s+rFCvWa4vk plNkiqX4vOrsas43VOEqA5XOVcw6Ay6uN40XJms4Y/4wmwnmLM1hLsJaY1IzbQtJhdsq d+UJ5qvwtOs9w0JJSwwGy9H6S5VcPsnH2qmcYVriiZn3WgZeHGAx7KkPyH8Ok6br9ega cJLK8m5JunYovq7NzUaXI7JLQ7a9voTpPpgSV9yPXsyT4zljuZBpz3yJC2TBt26AxIYZ 5z7y6mrqcEH/55sDD9oq/SXY5xGR1M0cMZnPGw6fVttdhAFZGRFZ0YmB+9Jh1fr2AzUA /roA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-transfer-encoding:content-disposition:references :mail-followup-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=FlqVLVysV6Sk3zyRmGDB1SHg9m+QJBFnqkK6JtH+9YM=; b=OPQNyfeAwS2pI87bJnIwJYkgvIpOwOJqnihCcrDJyqaV8E/UodG/8zcrKsx1fGEx2l oJ7wtQ6Tf2flLk/2rTueSeHmB2JiztK4J2F+BTO/fJr3/Sq+3Wt/QCOD1sjvqq6j0cC9 4gbDDhOHpCkOf3Xzi5mOZlIpWn2IMIH3Xacqnq2TYjn1jy02Xd0LlSHxgwwrTLXSheui Ef0UM04koppYyhpBelM/oJxTWZaiU9eJN0XPk+Xj7daU22xPtF2vhV957r0Wha518H3Y CicaV7yd9nHa0AmJi/arZ5GCexLd+adR4HTA//339n39dFhYsTlH4nZyndykA+ng5FzJ ppaQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=XfB1HDi2; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Z4CwVjbv; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 83-20020a630156000000b00520eac50926si16968097pgb.824.2023.04.26.14.10.22; Wed, 26 Apr 2023 14:10:47 -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; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=XfB1HDi2; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Z4CwVjbv; 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 S233612AbjDZVH5 (ORCPT + 99 others); Wed, 26 Apr 2023 17:07:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232360AbjDZVHz (ORCPT ); Wed, 26 Apr 2023 17:07:55 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2899B0 for ; Wed, 26 Apr 2023 14:07:42 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33QGxDIW025309; Wed, 26 Apr 2023 21:07:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : content-transfer-encoding : in-reply-to : mime-version; s=corp-2023-03-30; bh=FlqVLVysV6Sk3zyRmGDB1SHg9m+QJBFnqkK6JtH+9YM=; b=XfB1HDi2v2xw1PBeEg3mgU8v5QkCpxNjyAAPm+dOxM64BLabpNKVWODDKrdV2OkxX3PS NmqxWzJyPUMjp5gshQkH5rjWi2o59KGywjSvpnAl6KtB2UNIczMSMxhoiI0WMISSq/cU XZcSxF/78zuNOn3p9f6bmI1Tw1wKX94HTeLixWvVmmFkt85EzBxSWRrxguRt5Yku3vGO rtbjgIHfWjxC1kr85pxOxDBKoC+1vcSm8WM0o2SJXChJZbEl9vTIJXZUb2pMwlTIL67d uG4Lx/gPyFdfvK7hdaWNOxnCS5+rm2oV7x0byB/SM5cmhDcyOf/SxixGwHS60LOXkm6y VA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3q46622mb8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Apr 2023 21:07:14 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 33QL6lIt025163; Wed, 26 Apr 2023 21:07:12 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3q461erm1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Apr 2023 21:07:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+Dpy9HcgIk8QraRNN3QsPSQJwfEpTNAgoJgtmEngU6+PRPFXr7ZxV2Nayw1Ep+2NTFwB46Twj2I4wQAOaIlwdfaCCHsZZCyhuX6L5XHOPkTW1LbX5areBWn3O4uyX4/tBCWyFUJkLbtoSvH8JaxJXyuWvyhlsaSRnmTPMGQMn4TMsLSQih8szTV2spMxYjRDIMqg7N8ATT9X8S59uUXyxm8lPd9e+KB/VqDoC+X9RPrmsss25d/9Wle+HTTmDleKK0LXz0b3VBfm7wAmvuilah+PM7zx7ty8RtQqK5pLOsHzM71cTZtg4aQ09txyPm7u2MqvAfuxaMmTQwbgi34xQ== 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=FlqVLVysV6Sk3zyRmGDB1SHg9m+QJBFnqkK6JtH+9YM=; b=Xum6D3HZILxOLEFALDWFQ3JMHegOA1KLVZq4YEUIolVmXEmDfnPBqxCBbAtv764CPxJBb2v/ZtKveDPOmU/ycnKh5/s63y9uJwe33xYGGMDHxiqn6zapXPT4XjvkjvKWIsLkj30WDWLktVDvrddidn4aiBnj+nPWgDCUdswirsJOEao1pKSb6nMix9HZq16MJo/7YpL/w00DBVdgPzUpAaEHwGDu4+7fNV7/qgZAoUQg51UQX4yueRFK4CZJ37iQrtcSB3ZuEpCNyvhF/o2YtA3awGwH6GYJzYtHrO9EYfmFRBnyHNdjpLTFMNknuNot0xkWoVCwvrehSLksjbqpwA== 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=FlqVLVysV6Sk3zyRmGDB1SHg9m+QJBFnqkK6JtH+9YM=; b=Z4CwVjbv9jQeDoN4ifaTUyie5JbRA58aFMtURC/c/nxGrF2kDbfCjpx87Eqk0kW+/9JG0v0V/tgnF7UEd4dRoSzSgm7/mNm+5qSCDcN8/K3HoYGcK56UsM99FQOXQ1Cd2aVzHNHnFkBdYO6ejxnJRaGSx/MRxGe6NfV4N5oZryk= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SJ0PR10MB4510.namprd10.prod.outlook.com (2603:10b6:a03:2d6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Wed, 26 Apr 2023 21:07:10 +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; Wed, 26 Apr 2023 21:07:10 +0000 Date: Wed, 26 Apr 2023 17:07:08 -0400 From: "Liam R. Howlett" To: Peng Zhang Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, maple-tree@lists.infradead.org, Wei Yang , Andrew Morton Subject: Re: [PATCH 02/34] maple_tree: Clean up mas_parent_enum() Message-ID: <20230426210708.r2gpnzocxfulz5y5@revolver> Mail-Followup-To: "Liam R. Howlett" , Peng Zhang , linux-kernel@vger.kernel.org, linux-mm@kvack.org, maple-tree@lists.infradead.org, Wei Yang , Andrew Morton References: <20230425140955.3834476-1-Liam.Howlett@oracle.com> <20230425140955.3834476-3-Liam.Howlett@oracle.com> <75ebddd7-641f-0274-72c5-415007d60cdd@bytedance.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <75ebddd7-641f-0274-72c5-415007d60cdd@bytedance.com> User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT4PR01CA0242.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:10f::21) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|SJ0PR10MB4510:EE_ X-MS-Office365-Filtering-Correlation-Id: 24bf1680-7fa7-4561-c69d-08db469a338e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4jr3ZaaOdUEHuARZy2xQMgzApJliYC47HP7H1l5LmGck3diEQSltjok/N2mBafQvGaYc6zpDX9cC5FUbtslptnXlGU/jigj+EMdaRmcWW4w35CvQG495hoOmwHXTJg7bGSLhH7JzzhpmLLEDG4v8eekQ70GtH6uDi9k3RigQI3fAOXJRbg3UBrsQ4RV2yCZfnrHvl5AoKp1F4T5o4UDX1sqVU7EdklZiJvlrH7J92b5lu0okSof/RUYHDt9NWmx0vIbVvRFX4DFJ027SWSPQaFSPnfa3bAi8kR+KwCebri0ZTiqINDnu0Cy+jWj4hPaM4jP5Fo/DTl9GcRiNBNKkZnNZZm6YSeb2hPjKBwRIKbkSeJs2fwJVM4LxLEDfJUll1Ez1t+iMrPcbONWENJNCulbRzqJVdcJc00bOvziFaJSXnq2CjDIS7oICkYZ16vhR/AnOVRsWQxXVvMyv/qTxwJqsEqlYy1S9OdybPRWqk76xxiBdCWDhTDjiqGLdqL3zkcTmTAkXieTewJXVwJFPq7Jhdn9BRJfM6sWraWUBgwM205+TOosa3lQtFfmOgN6u 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)(7916004)(396003)(39860400002)(376002)(136003)(346002)(366004)(451199021)(66476007)(478600001)(8936002)(8676002)(316002)(4326008)(6916009)(66946007)(66556008)(41300700001)(54906003)(38100700002)(186003)(2906002)(1076003)(6512007)(26005)(33716001)(6506007)(83380400001)(9686003)(86362001)(5660300002)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RVNyalhTd3pqL01ObGJTaHNmcE1QZnBFNlZuSHBRRC9uN2dyekpmM3NHYjk2?= =?utf-8?B?ek0yS3RGMVZKcEpja0NJS1NOOXlsRjQyMVZCNjQyMlVQQk5jU0tqaXNkUTVX?= =?utf-8?B?Q3ExKzhKSFlORmVWbUhzU3daOC9FK1BSWm1hZmhMSVpwek1HUHRiT2p0YTlt?= =?utf-8?B?NndRUE5sUTE2NitjNkFwKzJwT1hKQmNyOGZrUnJVNHNEMjlpdmVFckhCQnd0?= =?utf-8?B?Z1RxQ1dHN1ZzaXFQcTFzOWVsNENZcVFiRWJ1UGRaaERGT2g2cXB6dmNObldJ?= =?utf-8?B?eDVjSWIwTGdvTnVyK3JZTUNOWlN6KzBsaEU2aWIxMlFxbkhzMi9rZnZWLzR6?= =?utf-8?B?TGduRmJOM2tmK3ZKSkIwQjQ1aD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EZ2N0kxdUhHN2l5bTlk?= =?utf-8?B?ek1sRy9lNThQNjVjemlpTTYvWUNHRmtDSlBqK3RHRUN2QVpMTG1zanhMQ2VQ?= =?utf-8?B?TkIyaG92YnpFRkdFVG1IeU5QbXBEV3hMeVJVci9FTlhvdUQ3WFdDSTMzbXN0?= =?utf-8?B?Vm9nZGVkYU9wVk1KYll3d0ZIRjQ5YmlFMHVMQVFBRDBCMnMzYjdxVzlTTTZa?= =?utf-8?B?ejFMWWt4aHBYb3ZGYk5VM3BmSEJ4ZXZ1bUtjNjZ3MEs1MWF6YzZsMHpPc2dP?= =?utf-8?B?SEJYVGxYczZlNVdDQzFtTUkyQzU2TE9NbDg4b3FtWnJKYXkxRzlKOHlsRlFL?= =?utf-8?B?OU0xVzhuV2hNSlllVmdMMXJQUi9vM0Y3dWYvV2dxN1JjcWNGZmJ5QkY3alZF?= =?utf-8?B?VGEvMFB6QVdYaFhhaUhMSWdkUUl5R0swZ2VnN0p6Q0lKbDE0RlFTQkZ2WWY1?= =?utf-8?B?SkFFY0QwdmNlYlNLWVp1VEZHNkw4Zm85bTB3T0VxU29IeTFkUT09?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24bf1680-7fa7-4561-c69d-08db469a338e X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2023 21:07:10.8114 (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: dxWgWB+LZdf0fuI9rIaSeq0JawXHRMqEPllGX5hgReAnHDhcbCj+bLWGHWTG/0shvDhDwG/6KKFPPKoWESVCdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4510 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-26_10,2023-04-26_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304260183 X-Proofpoint-ORIG-GUID: EYVCYRlzNs5LI-Ro4m6WeTVRMXAkeJ36 X-Proofpoint-GUID: EYVCYRlzNs5LI-Ro4m6WeTVRMXAkeJ36 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,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 * Peng Zhang [230426 00:15]: >=20 > =E5=9C=A8 2023/4/25 22:09, Liam R. Howlett =E5=86=99=E9=81=93: > > From: "Liam R. Howlett" > >=20 > > 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(). > >=20 > > 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. > >=20 > > Reported-by: Wei Yang > > Signed-off-by: Liam R. Howlett > > --- > > lib/maple_tree.c | 28 +++++++++++----------------- > > 1 file changed, 11 insertions(+), 17 deletions(-) > >=20 > > 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 s= tored > > * 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_eno= de *enode) >=20 > Do you think it's better to rename this function to mas_parent_type()? > The meaning of enum is not obvious and there is already a similar > function mte_node_type(). Yes, thanks. I'll make that change in v2. >=20 > > { > > unsigned long p_type; > > - p_type =3D (unsigned long)p_enode; > > - if (p_type & MAPLE_PARENT_ROOT) > > - return 0; /* Validated in the caller. */ > > + p_type =3D (unsigned long)mte_to_node(enode)->parent; > > + if (WARN_ON(p_type & MAPLE_PARENT_ROOT)) > > + return 0; > > p_type &=3D MAPLE_NODE_MASK; > > - p_type =3D p_type & ~(MAPLE_PARENT_ROOT | mte_parent_slot_mask(p_type= )); > > - > > + p_type &=3D ~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_eno= de *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 =3D mas_parent_enum(mas, mas->node); > > - unsigned char p_slot =3D 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 =3D mte_parent_slot(mas->node); > > + p_type =3D mas_parent_enum(mas, mas->node); > > parent =3D mte_parent(mas->node); > > slots =3D ma_slots(parent, p_type); > > MT_BUG_ON(mas->tree, mas_mn(mas) =3D=3D parent);