From patchwork Tue Jun 18 20:47:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13703032 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 60651C27C4F for ; Tue, 18 Jun 2024 20:49:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4F0C08D005B; Tue, 18 Jun 2024 16:48:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 313058D005F; Tue, 18 Jun 2024 16:48:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 138FD8D005E; Tue, 18 Jun 2024 16:48:46 -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 DDC798D0059 for ; Tue, 18 Jun 2024 16:48:45 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9A58C140AE4 for ; Tue, 18 Jun 2024 20:48:45 +0000 (UTC) X-FDA: 82245198210.20.92C46E1 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf01.hostedemail.com (Postfix) with ESMTP id 61D2840018 for ; Tue, 18 Jun 2024 20:48:42 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=IIRl+aEG; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="l/rGJPax"; spf=pass (imf01.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1718743718; a=rsa-sha256; cv=pass; b=Gtlu+KeKa6qoTLiCfbwvHUDOnDHy8ADCtlA0UPfzm2Cyj2EJQpfSWIK08N9MxfHyC2lyyg ItX5a/5G1eIdX/h70jmJ3sIHDemIrkN2FKdjxlRJxrSf9ufvWn8rw56Pfu38lqxAG5fuln 8nkdQzX/pO2g2QNKmj6JQRVVon5MHVw= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=IIRl+aEG; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="l/rGJPax"; spf=pass (imf01.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=reject) 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=1718743718; 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=Mr7ZCZdBNUuLIytxDOxFub9NGBSHRTcM1seHAm11Q1w=; b=mysOLJH6KrDnHAmcVDwo6h4hMk9J0SKSwQ+d5S9TRHaoshRejd0kE50f4+qjdYhCN8oipg tYBNqkPdYQdtu9xAgGYP5RzLa2Sr6bwuGoubV+5TS9V+YeUirv4XL22kqvHapL2ZVjDSAx WyCeTxqwj5efUiLCbE2cHLo6W5tfiTU= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45IIV0JD021561; Tue, 18 Jun 2024 20:48:36 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-11-20; bh=Mr7ZCZdBNUuLIytxDOxFub9NGBSHRTcM1seHAm11Q1w=; b= IIRl+aEGRyolBpHTkebEz9fR8G26yaPruGdXMXA42lqJdGOcOL7ZAA5p9NDFy4QA n1GV9J6pAhVbb0ED2eQqJNQwGwU05JvrZagI0JuMiLICSn3TRY4b/PXhW9DCvIKq 3ljc0qu+e4qBKWAKb7MUnufjIFhBfTMX+ELbYTPFk7E4I6Bi2f+llmSAiirwTXy/ eWyoWo5MhZznYxMlRVI8+fmM5/e1M7aEVj2dvgZ7WLQF6GRNBdX1lAH39721D4CN 6evPLsUZC3d3zA5crGy4vPo9+Jzt+pxDbQ3VXQkhs8INL+qeTDtUTfuTgftCCqLe 2UBBxV/oRQS0AxQ+IRpfKw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ys1cc5u8k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jun 2024 20:48:35 +0000 (GMT) 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 45IJeuRf034707; Tue, 18 Jun 2024 20:48:34 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2040.outbound.protection.outlook.com [104.47.73.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ys1d8p6p6-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jun 2024 20:48:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mFaQs7Q8kQPRVV+O3q7DbXJulr29DuqcH/WSfYqJpcaafAmhGCgT3dWwcGPPP0jGfmWjC6i9VkBRc7lBl5L0qhPs4dBBvaca8LxJPIQrr6wmGqPZ4xauYnWxBnuRp1jfC88n51RiF0kiuaRSjPBdF2aXN4pEvKZtsQ+Zcoi1/i0NURDGQjEzuqLN3rVYv3cb1vr4feLVRRyBXYOBf4G5hQuSrS1w1Z11mIq+YU4NwfCbJ0LY8WMO+MTuKlBpEhbBzjg+6yWZau+w1aP8Wp8ca3XTHNoTA0VWp8wfd73K+CNl4W66tRV1TnBVPyJXvh6AEvOxmYG4TmYF5d5fczn2/w== 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=Mr7ZCZdBNUuLIytxDOxFub9NGBSHRTcM1seHAm11Q1w=; b=ereV4egk95cQzQ4BZaQJAhInEWyy9wt0q7RMvpRtT7oIbqWoEAuXDzfvw/w/sJ7rXRdMhrCffgHaMXsjJ5h/jdkqvXTLyb7eYpBaESYRbOY+4c+Yla570Ot71ZEiFoepBW29x25b7kyoaJotmPT+DKBSD/bFw1YOLI4Ty8M6V52Uc3X3eJjUTSEB9dARbt6OZ+LAWM0A1Kdux9275unEuKUhlO+ZI+/85A0Xp7+cg1+VMZ4pOdcVorQXYdFvFPRanu7Kr6mRbGIPk47TV+2nJtpqOPPfnWjrH/RiCh43TChxlfI3kO0d+Vl+bXvbJg+vNbJflUY3D0PGFRmEyCjqaA== 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=Mr7ZCZdBNUuLIytxDOxFub9NGBSHRTcM1seHAm11Q1w=; b=l/rGJPaxN1L4W6UCT53WboC8Chgy/rZI8UZPGPqe9Q+J5AEcHfLwCETE/pYMrZjQlWybQnbQfUn9nBID8wOKOF5eRa6chBlFKC8/lhQb6QRluMiC0Q8CGM0QJp0kt0W1fpdlYytWVS8ZxfEilbBdEg7/PSDOsI1rhjufLnTBB7M= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by SJ0PR10MB5785.namprd10.prod.outlook.com (2603:10b6:a03:3d1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.31; Tue, 18 Jun 2024 20:48:06 +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.7677.030; Tue, 18 Jun 2024 20:48:06 +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, willy@infradead.org, Sidhartha Kumar Subject: [PATCH v3 03/16] maple_tree: move up mas_wr_store_setup() and mas_wr_prealloc_setup() Date: Tue, 18 Jun 2024 13:47:37 -0700 Message-ID: <20240618204750.79512-4-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240618204750.79512-1-sidhartha.kumar@oracle.com> References: <20240618204750.79512-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: BYAPR08CA0055.namprd08.prod.outlook.com (2603:10b6:a03:117::32) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|SJ0PR10MB5785:EE_ X-MS-Office365-Filtering-Correlation-Id: 8611efc6-64af-4cdc-954f-08dc8fd7f454 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|366013|376011; X-Microsoft-Antispam-Message-Info: hrFV/yvpCJOJSYFS+Hhnk0Yv1gl/Y9ErTW0VrJIdT+kQ+e3zqRAZydZjsyR6/MHS4Y34aUVt3dxc/KjcQ1PyC1zJjIDPHIWH90u8eBCsTmvazsiPbYm3PCbIyPqG6X9yk/t6yLI/gOHwQJdfoEgXQExH5cyefSL9zOHdvdRdFxCRgYJHQJ93WkUXCFtgCOG5FglLix5Y3mL31vTXHkss0XCz+XRsaRGe5Vj5oxq+XCa+P2z4HfuQZc3/7t25MnqwzyHIb+PYI2Cc6CSm/mHZ8zRmkq4TUjt6MjFbdfRbSB3oOn1jnE/G6ol5cPGk8smF8sIN/F3cEA1R0+x2EDIXunM3mSKAT0/daRFd2fI3Rtn6OHzDZ9gwjOk3ylkmCSIdxQli+sdMeeLx4u2nWHQt9MorsUdPBdkzxS6UKALJXs+UDDppirFJWwd9vmElZN5k0AjKDKletUCHLUsb/7BX1vHgryqaw9Yl2Qw3XqzC+HmakDxi2Le4iNX3B2HAUGpo+8RSrj1HujmK+gfzbprT2dRJI/KtkUBwCpkyJtSIv2PgSF+2pxSuHfB8D1Y/Q1cflpw3GdCBhn97LzzKHx/oZljdWRCw99yNbJoU/0qX5/10jXZBgIIEqTUTvlofkeVGyk6FNdvPThFrh7eSjV1tjKuoHaPXi+UJGiHAaNfpgR3eJLwdkcAtfe/dDDTPzajF2FUrhS4T1KCfDmDfH0xrTM8cIfUabWaEmlXwVn0L3JqJFBXRhLKci8KR27Mhndq6P4LMtA7YDKKOFLzoN5Hip4qDoxOZmvunmQM2HAXFiLG2uTOHjn3AXGbqYAO/6llQObdXZ1wWW26xaX09+e+A9zuAeHkdG2zpoxO8QLQqU/Iio0E5fpKyqr71lFXKOwkn3AZX032qUjFhpuo+ZiJPRzwjw9rZmR4/ZxSC0mkCcMy1/EOuIM7168vgHo3Sl5s0+dO7B6sUizhd9VM9dXwI8etjIM96iv6NkrXb1SUhkoASK3gggbnbuIVUKbxcTcno44yY0YbcsYZ9FBFZWb+/cusIy4XSDFZ7HNnD06/HGtxXTfr3QODT7f3jFQ073bDvvieZ/J4iAFDeSmUiK04HFKzg1LK8l/0qblztX+9U3vvJf1RTzPt+psfqmEYsGFG9eQkk1Xh4yPPeZGbtQ+s8qP8oHzV6HfEqwQK80+fNmbkr9Vp4VBJudHJe47RPynKAHapMf9I8xyWC6UhRuTlUqC5V32bvnivTYXewLViFQn8ZwFacXrDRj9WRfkz7JLfcnGog57AEP6W6wL158xbpxzSl+dTkY9BkTzA2Bye/oi3Qf1kTlZPXRuyGiA6jbpBN 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:(13230037)(1800799021)(366013)(376011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CVhrtDOz8iEiY7PixQJkerV4+e3VoqLsCipubbXQ7BGLxExwZmnJE452bXFIVH5AFj/w/w7iRqmbFnZ9rvco6egi0VZqYRE+OgYxiTpSkcXNRQHQX/4B90cBPCTKP0E9FjC4qcUJgHmKXiyUUY5AvyvMTuq7MEwXfR41BrR3uN/yqV/bzg/9yfi7bMMwsIOoizpQS2hSVSVQSk8vGEsUcuk1AWdT/fRMhNBRyd0gCasD4KyomsERRapDrAkaLef6i+Bf2HpcuQ/GltG3VDltRuZYnUW81ElhFl2nkOMEq8wuF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D3bglqY2IrMjWJK9IWyRqunkfJJKV0MEjxLeVXjbHbXtvuKIPrHgNEb6U3vqF3DzO4YAkE/tpgYgKMT836KM7DO1kIf1mHWDFc8/fwMjw0GytUFn/mguMwPu8OvUS8PFIBgjJuvkizcfG0V2W0rqD/vnPIDSrHiEX57NlmdAC6JRAzP8QNlMDx088LBhnZkbDNUE+DaDWOq0sEAaU/+jLgIg7ypv6o96cAcmB7JA1xFc9pW6NA3oNeI07kiU3FsArPTh9We9I= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: z9ZE7JVl71J75SoLyAQY6HSQAU7nR25QXkuNXw9TK3K3VuLg/jfEC/CJmFLYG6nrGxe2PYKKWasuqwNCDvHgPkqiodSNvmVBipxAS5o84Kp5SyMbL1nj+a/cfET0OglJhMn+TksAN5oLbukssW2eMSMhss8pPAN0hs9by5UGmkp9oT3esBY7RaQxbZ28yvxLJJ7akgDlL18h0624FdDqmfdcMuiitOzMt6BaBU/WlzWe9po8H60EGl1QSedQaDBMDtUskYkj9vEzmsCu7u5M3Mt7QqrdXzo0lAGfiUlK9SGrTequ7QU4Wx0nxQ9XfrrqEiUtpeInkfryJcOB7+qZGz8VSjITMcvI5ZzlkDrF+leRGU+7IVOIczaOBysQBlApLjTeXsGInvLQX4GJYyecTnQhG3DZ01+3ZVbON2ga1vK9eNLtwqFOUWLbwp7mG8CGvjwXILjMsYpcJe48vIBR9YsaWnpKSPIymMJRJIQsGTDkRBeZy/9S+5s/cYPJXySXbNHGMD30DOTXp3EIQnc5xrjWalouQbzK2VkTMJBKow6Ha0iBruiIod/GqW6SwdBR2+lT+ideBhQiYphSF0rd7dnXR4Al9kWilQL2lZBjwvg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8611efc6-64af-4cdc-954f-08dc8fd7f454 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 20:48:06.1121 (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: ehuVBZVWw5Jfz0sVddriFYgj3FqGe5DQ8GzG4rgNmdcn30T0bjiKRmUJ5Ab6SST51bIMQidNhuz+FFfNN8b4ZQ+ZRy5NtFT35qx0S+94RJM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5785 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-18_04,2024-06-17_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 malwarescore=0 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406180153 X-Proofpoint-ORIG-GUID: 9rhLJK2pIFfwMyrpN25MycHVqCZqWx8u X-Proofpoint-GUID: 9rhLJK2pIFfwMyrpN25MycHVqCZqWx8u X-Stat-Signature: rgibzkpo1zfr3pwqhpd5ifgh5j4qohka X-Rspamd-Queue-Id: 61D2840018 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1718743722-203215 X-HE-Meta: U2FsdGVkX18erEj87J3jXHHWFuIN5tHEqOmKH0Bhn3B2HxdkWtVWhuU2T7EVpfSHoSYkxjCfSAnEBuEr1awFCOadWlxPW0Hj40M7Uymwsd0fTzaJfGUUa6cQLFRgggHFZkgdzmRkppClb6XitCCbLzb4SaDxtayk7Do6mZsdkbTNEK3lUe2OhBftQ9MfDkTF6skbFkALTWzT3MDEqq54SdvMaYI+I/QC0DeF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BfjiqKvVb4jXlO7AfFV0OjVTUBksE80zceeVvDC1jO6jRx2oyixlpR3wzzK9Kfn77BQIco/SagZP7T+IXFIJP30o63yE2Aa1RzJ2ieH/V+gcj07VU92zKhSLlXZbSUVrOZfr9j3wRMVwjfHSsMGdb77ADhC+Jkg== 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: Subsequent patches require these definitions to be higher, no functional changes intended. Signed-off-by: Sidhartha Kumar --- lib/maple_tree.c | 96 ++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index fe490ec9067e..62b465f0d97d 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4227,6 +4227,54 @@ static inline void mas_wr_store_entry(struct ma_wr_state *wr_mas) mas_wr_modify(wr_mas); } +static void mas_wr_store_setup(struct ma_wr_state *wr_mas) +{ + if (!mas_is_active(wr_mas->mas)) { + if (mas_is_start(wr_mas->mas)) + return; + + if (unlikely(mas_is_paused(wr_mas->mas))) + goto reset; + + if (unlikely(mas_is_none(wr_mas->mas))) + goto reset; + + if (unlikely(mas_is_overflow(wr_mas->mas))) + goto reset; + + if (unlikely(mas_is_underflow(wr_mas->mas))) + goto reset; + } + + /* + * A less strict version of mas_is_span_wr() where we allow spanning + * writes within this node. This is to stop partial walks in + * mas_prealloc() from being reset. + */ + if (wr_mas->mas->last > wr_mas->mas->max) + goto reset; + + if (wr_mas->entry) + return; + + if (mte_is_leaf(wr_mas->mas->node) && + wr_mas->mas->last == wr_mas->mas->max) + goto reset; + + return; + +reset: + mas_reset(wr_mas->mas); +} + +static inline void mas_wr_prealloc_setup(struct ma_wr_state *wr_mas) +{ + struct ma_state *mas = wr_mas->mas; + + mas_wr_store_setup(wr_mas); + wr_mas->content = mas_start(mas); +} + /** * mas_insert() - Internal call to insert a value * @mas: The maple state @@ -5358,54 +5406,6 @@ static inline void mte_destroy_walk(struct maple_enode *enode, mt_destroy_walk(enode, mt, true); } } - -static void mas_wr_store_setup(struct ma_wr_state *wr_mas) -{ - if (!mas_is_active(wr_mas->mas)) { - if (mas_is_start(wr_mas->mas)) - return; - - if (unlikely(mas_is_paused(wr_mas->mas))) - goto reset; - - if (unlikely(mas_is_none(wr_mas->mas))) - goto reset; - - if (unlikely(mas_is_overflow(wr_mas->mas))) - goto reset; - - if (unlikely(mas_is_underflow(wr_mas->mas))) - goto reset; - } - - /* - * A less strict version of mas_is_span_wr() where we allow spanning - * writes within this node. This is to stop partial walks in - * mas_prealloc() from being reset. - */ - if (wr_mas->mas->last > wr_mas->mas->max) - goto reset; - - if (wr_mas->entry) - return; - - if (mte_is_leaf(wr_mas->mas->node) && - wr_mas->mas->last == wr_mas->mas->max) - goto reset; - - return; - -reset: - mas_reset(wr_mas->mas); -} - -static inline void mas_wr_prealloc_setup(struct ma_wr_state *wr_mas) -{ - struct ma_state *mas = wr_mas->mas; - - mas_wr_store_setup(wr_mas); - wr_mas->content = mas_start(mas); -} /* Interface */ /**