From patchwork Tue Jun 4 17:41:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sid Kumar X-Patchwork-Id: 13685734 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 17363C27C52 for ; Tue, 4 Jun 2024 17:42:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34A436B0092; Tue, 4 Jun 2024 13:42:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2597F6B00A6; Tue, 4 Jun 2024 13:42:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 036D06B00A7; Tue, 4 Jun 2024 13:42:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D3DDB6B0092 for ; Tue, 4 Jun 2024 13:42:33 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 855F7A039F for ; Tue, 4 Jun 2024 17:42:33 +0000 (UTC) X-FDA: 82193925786.11.4C6E537 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf09.hostedemail.com (Postfix) with ESMTP id 203EB140005 for ; Tue, 4 Jun 2024 17:42:29 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="jFAvl/L+"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=dySYejhE; dmarc=pass (policy=quarantine) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf09.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717522950; 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=BPtTPhTSFq5Lkbe5Z3QKORs76kLwd90+PV094KlROIg=; b=vKuh4gsLNpAS92nnKAuL0X5B82VpeXRJR0uxP7kBo7kgpdBJHAp0gRTitlLejxstk7M1hr eRVCZ0XTdLthrat254mEuJmVVeQGl9aVqIW5fQ3JfxE+tKlkt9mgm+jHLS20Mcb1lXuIHZ uNbpTlvvKmg9UVJiP8UwKSnDVkqiL7E= ARC-Authentication-Results: i=2; imf09.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="jFAvl/L+"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=dySYejhE; dmarc=pass (policy=quarantine) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf09.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1717522950; a=rsa-sha256; cv=pass; b=oy9KyiT7urNo1e32FGOixzPQbyQDIrNO2zYf1uGRFjTgVlZ/S8IFCJuQhvJn5VMdu/uQoi TG38JzEyUb7jEmwE8fxGqoF9VLJ0Flrsv1vWy+jZP/D5U0yKIks4WuLoZQC6faTjBbpbhV 24q9VDEK8tmeQpGv5p+UMpcybgUnB0A= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 454BnQgJ026488; Tue, 4 Jun 2024 17:42:19 GMT DKIM-Signature: =?utf-8?q?v=3D1=3B_a=3Drsa-sha256=3B_c=3Drelaxed/relaxed=3B_?= =?utf-8?q?d=3Doracle=2Ecom=3B_h=3Dcc=3Acontent-transfer-encoding=3Acontent-?= =?utf-8?q?type=3Adate=3Afrom=3Ain-reply-to=3Amessage-id=3Amime-version=3Are?= =?utf-8?q?ferences=3Asubject=3Ato=3B_s=3Dcorp-2023-11-20=3B_bh=3DBPtTPhTSFq?= =?utf-8?q?5Lkbe5Z3QKORs76kLwd90+PV094KlROIg=3D=3B_b=3DjFAvl/L+BFGX9WqCcq2ir?= =?utf-8?q?TTNP8oHSeWONISFlwqPB5zq5KsocF5glVTJJ4I+tVZTslEQ_Z7N/uM+XffOB8WxIg?= =?utf-8?q?aXHb4YGNbaYDXnWrt+ENiBoa3n0kkcTg0Z8yo+sRO5XnH6s+bzj_yoHsFrtYcyJfC?= =?utf-8?q?Oh+8q0qAaEldjUdGY7W02bM9fqVZtGJ1G19p6HSbCNe5M3+QzKO/XBi_Ci6PILK/d?= =?utf-8?q?TuqDFaukYBDZe5nvfCIZAp6hK4eGNg8kolPC1e0ZWqhQPusWQZdNztPj9S0_8hp6H?= =?utf-8?q?SIKVOaSlzSx/nch3J2RnVA6p12G0hOi1XEIB3N0ouG7lhGkbxUyxsii4u6vNdim_X?= =?utf-8?q?g=3D=3D_?= Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yfv07wjy7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:19 +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 454HbJvI024002; Tue, 4 Jun 2024 17:42:17 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2045.outbound.protection.outlook.com [104.47.55.45]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ygrqx69q2-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nL9znb3RP820P0FOFmZTiqIT7lXIQ14qHoFDfd3VDi6+Mb5PA3T2O6PHOBRsXW/hze45LXSuGS4wWOtd4U/JkxnkM6w4Hz3/xI7psBMU5A93jSI5tnxj5PG+qR7cBRfFpvdl3ftndvMt0rTxFoigdpFCx2HDd9zFibS1nmqWJ3L+hhTOdn9gZ/hV0+4BTRJmHI1LRB+ZGLuISmLsBUEULBw0PtP28V71TX7CU3I7XBHnMmIdPAgteqXKKdd8HWiDR6/MGL20b5ePeFq+KdFNyeCsZnhcCz9DDM7fruyiyuN/e7NSySN0qwyJiXJnMGhYUJLCtDfR3KVVDMm8xee2wg== 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=BPtTPhTSFq5Lkbe5Z3QKORs76kLwd90+PV094KlROIg=; b=OYeikNjNgvd+uXyYHhXqX73hiXQCLQGiFVbQ3x2YLT/eHnKxKMY/G79/bf2vLMdWjY6gu1oTBFl0SFmFNgXDLWGMVumwQlhguGlE9Swfz8CFBUikJ68j95mreya3v23ZMFHaxWzgytfrhoadIpYsHqhD0Bsms+y7Aopj2GnG8AdylssdEgR7TypcqCdA3xD9CQIW0fFra9s0UQrkE5y3sCtFDBR6XiwM+hWLCTsQxrLUJRBNWQFs7TFNVD647tJn78WMk/rHWQgS8ka4GgIlqTJYHJXg6EOebaeUishD1DNI6IACXn/rvcU1nOfK8VsXtQ0R1nRIHI6qze9Hcl9C7A== 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=BPtTPhTSFq5Lkbe5Z3QKORs76kLwd90+PV094KlROIg=; b=dySYejhEU3JNsgAuw7nXbTfF0FxyTO9oNqrSWHHA2uWXfBzNO1yJylB8d4NbQnEq7253joOmWq2RA9nXBsbFLQnZFSfLlZZDWSiBsBXWyhi6eCMjLFn5ox9qZ5pjH4zLvZ2hwoh8NHwaJVD2kN/gvlFTDjhkwHI1heS9IAdso8U= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by PH0PR10MB5893.namprd10.prod.outlook.com (2603:10b6:510:149::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Tue, 4 Jun 2024 17:42:15 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2%7]) with mapi id 15.20.7633.021; Tue, 4 Jun 2024 17:42:15 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, liam.howlett@oracle.com, zhangpeng.00@bytedance.com, willy@infradead.org, Sidhartha Kumar Subject: [PATCH 11/18] maple_tree: use store type in mas_wr_store_entry() Date: Tue, 4 Jun 2024 10:41:38 -0700 Message-ID: <20240604174145.563900-12-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240604174145.563900-1-sidhartha.kumar@oracle.com> References: <20240604174145.563900-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: SJ0PR13CA0184.namprd13.prod.outlook.com (2603:10b6:a03:2c3::9) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|PH0PR10MB5893:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e16849e-7ca6-4ec5-7775-08dc84bdac38 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: HRlGNCVrKsgh34T2EFsu6c18mFI4/z/ihT1zCogoSYehSlDALID7bdcjvfhbj4jHYwVCGxSWKnxsT5GOdK/IBA7uCNv/eXjmiX0JOqaLl4Rt4A623/E39vvl2Ah9pMZkogE+LxGtlrygjtZjSDgNZaFRZLg3a8A3zqthGcE76+uiUNeoKjm+zkfnxAS35GsFWSemNbpSpxLnJhq+RI+dazwG/6sCvoFdeu+TzFuti8/bVuu0eg0tP5scnUDfh6/ELnieoo7UhOtgd2Gw0Xg7umRLkNhz0orzHTjjUf/llrWm/oUvOj38He6NqFRgnrxP22h3gZc47eAyqCMlNZPFj17vpbxdy/G4HOCH0oa0cDwNZ8W1y9uEvwAoEblz8bmRSrRAq9N3wV+z8Azc2bazxX21PT4UiXRjYvDNSIgvoWOPnakm8Trz4DkKq03u00ttngEyMaHTV9dLjXURxsp9wvugOAGJGJMtYMcWK2galBAIKJzORZSMb4WtWVQAfNABhAuYvhgVkviqTbRwVz5kOQ0vEn8mywIiXgHdxN2dL9qAJ/fn1AO9IPeYnKEStFo6MhkS0G/Vg2ZIdtDWaf3+BIysSeVS2q1v3r+84DmSxFM3oeM0UQ6Vpwmv39+XFrVmbvPJVOBhrIb0CyCuLLtnMJH6MCHDDx98TQC1Qgti2b5WWZ/yYoH25XFgSxvMB8RaDVR2mflQBbAafOSENhUYMa6BSGtDLogfa1rYubD3E1ZcVJaOwNjfIyJHAwxJrGo7d8MG26ZB4HjxMff4ZoEQSCrr//7zrTzSpl4y9UkIIOgdQbyNkvfNLj8iYY8fcGORa73gvPpSzxmxi2R4AVRwGRUrkL1e+s5drQ2NoZHRWOXlkhCZll+WNLLz3Nb5CfcSrbMjWfoTz/ftKU/55WVEBw962qmP16nxdYq4A0Q2eVFxbTyEUMW0Yi4a8eL2GmPFX2wCuGeZLIeAYtsIs5exlWytLZveKq0zYzOYRamuluUM1m+HJlzAT/E1UQhIGPNI4diLFkQyYd/HN3OEvqEDeTrLUkdCVEWlZV2rIrKo22l226LFZbC0OomMGwF++iigpKFIfoFeD5I1RtokmDVE90AngiZ7ugnxoNOHv+9GxdYKpUIicwJfRaG81XojzhHpaWGLJMAfAWqWvh0D+pAPc/QAsID1skTaWdAZgyaSF773i2u8SEffvQcIfdAQsRvNxp5iHDD/rRuqysRANGukfWzBgCvFfPgu6hDTvheDsndpPYogx4z473tKCOackTaaO22zdlRPtRzBnypP0Aor2Q1lllUv75Be+D0SS/aBMxQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB5113.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fciB/gNATGR8qHrIL62bOlHfsPtkZjjJVmDyuGju7M9fi1BaroZ1Ozi6OeoyraCkXsW4VPFsa2zupm4S916+1/Kv05wHslXeRmZvJmutAOnsTNvUKT0rd8kH7g0OigRiGKLfUveCywdX7lNr3ha0gXQHCfP+m5Thnyo2orALHpdSb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ng8dEdAbZ+aHQQTUEJoRPj8JEmClE9OTKj+C+GEh3C661iONAkzKOuKpCalvmhaz2pm1pTMmiLSWn/wVnjQMX73P0G9ZlC146OupC7+9r6vqv8mqws+yASdFad91xDlvXH9B0h5yL2z0rKmzgqBkuPb1faSXRpFmRLqEeq0QU+yDSPMt8OSE8NLKZVmgvChoHADFmE0+0Fr6xx8mtpCYUbcLcp+zJTW1bb+6Iwm7fGo9T8uiiCtAHpOgk3Hdvu0QdKA7o0Tn7Um65jazNV5QkrClCfByZUP7sSnlpzQIpaCT5IRkKuFVtV4cO8lUDXZJMLz7zXeVMpZAHk71mb0Y8tg0LcdS1jVZc2AkRYZqfP0nov343Qic1CSnWI= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: GhywvZYYAFFMkY5colRjYWv9aMGDUWNoQqTqzXiVUKxcuzb0XY7keexKdTbVkPdHq3J9nYEx6E9E8koGTT4GDxAK3cw0TnjgmLAo6D3dNcrtfEL33GRHfAzd9f5F0n4ShZjiKJwJ9YD1eMk4TM49A85XnM+S2qPITUWoeMJCP0aG5LiY0oNlwHpDKuE7eKTXUpTDFe2O8aNDJ3iSbbtc//LvzaciJSr1KqUr72McoEM9Yk+v++L24c0qLi/9a4Dg05LQk7M5dcpcmkpy+hG1V2Wl51ftYRbjc2aGdLVsz4iPaLc37FmXfU32A8tn47GIkAeV7rpB9wj3uJQpn+0Dw2NSYa/dvBm8hmRapHule6eS6PJLpSJtWrefAUESaBbdX8fefHoRwz8GvoDx/W/VnBzPjEWgl/d96LhFx9jOMrhVURFh7zuOErNx0wsHZtI3kJtjCaoQhqQV4OV5AHv8fMCh4mYVng1zzoTVnbo9Vt30p8oG++EdBKTBUjcSggirttXymeAQf9UZZK1fSQgi76B0fZb35dkpDylfmZpYa8E+7eOBylknj0l0yJeZKqTHN8M+noT5WsVAvSbNr6facFLMApa6paOkJkvFYk0UCts= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e16849e-7ca6-4ec5-7775-08dc84bdac38 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 17:42:15.3905 (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: 3j1JllUW84s9B0dS+xfwsLSw6oxuW0HJvR8mCpd+Ib0vwRIMKKdqNnRdqpVI2bSfr7lKKu8A5vUqsdf5O5+T/1Y8dcI513uU7P0IK4xD4eA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5893 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-04_09,2024-06-04_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406040142 X-Proofpoint-GUID: sPgAtGPgjca7tCyYUEaocuu-5rsppJpx X-Proofpoint-ORIG-GUID: sPgAtGPgjca7tCyYUEaocuu-5rsppJpx X-Rspamd-Queue-Id: 203EB140005 X-Stat-Signature: mztwzaxdf9gyye9ege5epbmuca7bc9o7 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1717522949-496355 X-HE-Meta: U2FsdGVkX1/JtiPnc2FQMKSv/ISfqgl7E2kobQNV/B5kNjl3xrZsoXpBLC432/EznX/1i1a+pSOUvAGj+UBLQaCvWLVrRIumqx5ej6ZWu4rn0P61ISsyOm7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TFFft0XUiVspYClpNFWFQ8+1bsaAGQKCRWymopZfo0wH7MEN7oq5Gkma+IfjVoMVzXXwvFdYhe6JuLkzi1k7oCpoByYLyOPDcE8stputKbad3BktJZ3Ll3lOL6Weunv/AxbN7rq3Zkkyx6m+zdNdgkxZnmcwNFMKZw57/tKxfV+t71BQ0t/oayG/ZxgZSAQFiWb2MygkZtEQVYuScOL/oO6CLr8AT1neOWZ1X+jIMAnlXuynIJ/CnYDrIKqbBETDIRinLM5qo44fxATOd9er/NEO4l6hNCA== 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: List-Subscribe: List-Unsubscribe: When storing an entry, we can read the store type that was set from a previous partial walk of the tree. Now that the type of store is known, select the correct write helper function to use to complete the store. Signed-off-by: Sidhartha Kumar --- lib/maple_tree.c | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index abd2f396bb1e..20e9d13c2980 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4206,27 +4206,42 @@ static inline void mas_wr_modify(struct ma_wr_state *wr_mas) static inline void *mas_wr_store_entry(struct ma_wr_state *wr_mas) { struct ma_state *mas = wr_mas->mas; + unsigned char new_end = mas_wr_new_end(wr_mas); - wr_mas->content = mas_start(mas); - if (mas_is_none(mas) || mas_is_ptr(mas)) { + switch (mas->store_type) { + case wr_invalid: + MT_BUG_ON(mas->tree, 1); + return NULL; + case wr_new_root: + mas_new_root(mas, wr_mas->entry); + break; + case wr_store_root: mas_store_root(mas, wr_mas->entry); - return wr_mas->content; - } - - if (unlikely(!mas_wr_walk(wr_mas))) { + break; + case wr_exact_fit: + rcu_assign_pointer(wr_mas->slots[mas->offset], wr_mas->entry); + if (!!wr_mas->entry ^ !!wr_mas->content) + mas_update_gap(mas); + break; + case wr_append: + mas_wr_append(wr_mas, new_end); + break; + case wr_slot_store: + mas_wr_slot_store(wr_mas); + break; + case wr_node_store: + mas_wr_node_store(wr_mas, new_end); + break; + case wr_spanning_store: mas_wr_spanning_store(wr_mas); - return wr_mas->content; - } - - /* At this point, we are at the leaf node that needs to be altered. */ - mas_wr_end_piv(wr_mas); - /* New root for a single pointer */ - if (unlikely(!mas->index && mas->last == ULONG_MAX)) { - mas_new_root(mas, wr_mas->entry); - return wr_mas->content; + break; + case wr_split_store: + case wr_rebalance: + case wr_bnode: + mas_wr_bnode(wr_mas); + break; } - mas_wr_modify(wr_mas); return wr_mas->content; }