From patchwork Tue Jun 4 17:41:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sid Kumar X-Patchwork-Id: 13685740 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 1512CC27C52 for ; Tue, 4 Jun 2024 17:43:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 43AF66B0095; Tue, 4 Jun 2024 13:42:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E1E36B00B0; Tue, 4 Jun 2024 13:42:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 149566B00B1; Tue, 4 Jun 2024 13:42:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E281F6B00B0 for ; Tue, 4 Jun 2024 13:42:46 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 8B72FC0F47 for ; Tue, 4 Jun 2024 17:42:46 +0000 (UTC) X-FDA: 82193926332.16.1929849 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf04.hostedemail.com (Postfix) with ESMTP id 4F70B40005 for ; Tue, 4 Jun 2024 17:42:43 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=FqeNTKLD; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=H0d9RaWI; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.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=quarantine) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717522963; 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=/axvbuW8khhoVEyMPhrQgsnIMUV1XCKocXZ29JyAv1E=; b=fXJJ1kUhax1hzfUQi8ZiKDGEpx3rhXVeUkfrjP8/gRI2yYVnfqsNFGWJSYKkDytTbR97/C qGnU+yilXolVhKnC2tFXD+6pPbet1UJw8dhhkPAREGJw1gHtJ/l1EcJ/NqYH0EAfX9rbZE frUs3Nm017a+nvX5+HA/KZIZe4lOMWM= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=FqeNTKLD; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=H0d9RaWI; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.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=quarantine) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1717522963; a=rsa-sha256; cv=pass; b=McPPPg9nPVHfAs9sGIxqnjBx/Qe9vvIrF89jV9g1Km1bsRq4G1k9CaRu2OWfE7KtN+RK8B O6gQQi+O9qq7upRjxvp8HIDRBNyepzNfqm3X9Bww/DTP5r1r1btiq0z1LAObzGylQzOKF+ HRsM2NEJ4ZmCulJ8g3I6+1MSn+/Q7b0= 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 454BmoPB013712; Tue, 4 Jun 2024 17:42:33 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=3D/axvbuW8kh?= =?utf-8?q?hoVEyMPhrQgsnIMUV1XCKocXZ29JyAv1E=3D=3B_b=3DFqeNTKLDyd3Qz9ctX6mzB?= =?utf-8?q?fYdl/yjrF15aSUWmAGSeEmdUGj7O9wJH3gDqwkoKVGWl5Ht_l5WOFBhunHkze6Vyc?= =?utf-8?q?cJ6uIj+wk4EsEk65AWlfsJh8x96AEjKR/7df1cI4Jf1N75AMbBw_HrZAHPd38oPoA?= =?utf-8?q?jb0HEs73/BnpP7lVAfHZOLt4abOqJJyShtSRcQzda6Xx7q8HUMt9YcW_zot2mghC9?= =?utf-8?q?O/BbiyNfXpCLqwvnozyeKLhpqtTFJakNaF4BlrqZU43AgbiKHUlbYJP3+SP_0f9yB?= =?utf-8?q?i0vUKhGyTc/QFRpQ8VsxrVjR1ZfIVixBJ2HS2V+TwSK9YXfiGgzJG46cimb8esp_b?= =?utf-8?q?A=3D=3D_?= Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yfuwm5jrc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:33 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 454HW4DG016141; Tue, 4 Jun 2024 17:42:32 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ygrsaf3dn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFmhjP+pH2PLlpTAIjwP8sBusL9t0gVpWc6Y/dVTsbYP+jB3XwxM36oK/O8FQUjbGgihHe534Ou4EOh8EjqoOex0jD1Y3qM8BhfoASpsQHZAusLVdpLLaNwl9orLNCUyirazIxGCSouIfz3Sj6xTCCnn3Sk9nqlv4VvqhaL6T/r9lOrAfgqTYP73aeXwG7t7vdCDuW3Ykvb8mEXjwc2Mp1EpOuNeDSh7CvpUHKd8HKC4cE1MyywfReJHESyQLNWsq2ouW3U8b08Rc23eO3ydSZMP0jR8udChJA/1eN5yjZnSMWLyB9NcFDfhJo8KARSUp8MAbd5jHJW42Ru9+Wq4FQ== 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=/axvbuW8khhoVEyMPhrQgsnIMUV1XCKocXZ29JyAv1E=; b=KfnTjjQ2Gk7796y4X3fN0VB9z7n7eal1cuAQCLamVwWTHsk2OAtmhS0LXYenO6X6ROOUzemLOjMEO0Yt+4HGhsjTM76bqDOYpjycJEA7ok/dvA1bFkhT4uA+SHw/rSkS8rLcXNeMWmsePi83CvawOENBm/EtqnWJqMX2mNFafKhTm4gpp2ZVNlOAeVXs3R0AV9EgXx+hbk4hK7wcseXwmAVLiYPd9zONpZu/beiK/611EhD+OUiMTrnRSHHDCqIIXrgjB9X0b+wLEdggsGadyRLv0En8XqJQHMogcmkckCY7uTRBRqupP2+CCzdlaKJNOpakHVJUxEHoTw7IpcLU5w== 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=/axvbuW8khhoVEyMPhrQgsnIMUV1XCKocXZ29JyAv1E=; b=H0d9RaWIb0Mrw+7vx0h1rwT72pQtdnuFMAQJSZeKl10TfzZzwIxgQLS1TfmJDg6aCvWL/oe64K+VBAxgiHqm/wXdI4XiZwSzSpYoDlGGS/nyVD2gP4d8wP8l+Ep3neegxVuTAllCtL78joqwSqCU+kECm402vvUm3myXvo1stY8= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by SA1PR10MB7593.namprd10.prod.outlook.com (2603:10b6:806:385::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Tue, 4 Jun 2024 17:42:30 +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:30 +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 18/18] maple_tree: remove unneeded mas_wr_walk() in mas_store_prealloc() Date: Tue, 4 Jun 2024 10:41:45 -0700 Message-ID: <20240604174145.563900-19-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: SJ0PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:2c2::10) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|SA1PR10MB7593:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c1b2a79-7cbc-4d59-d95c-08dc84bdb511 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: 4JvesdLVzHDvKx/UsmwaAyB9tozbNNdyDOvqpt17AFVnalB83nu2gH3Jd9zs5+Sl+9YfZb03YNuWWlR0MoBadJG4n3qVNymch65Kd9q/K29t1rOwqJvXdIB7dllit98fvMEULjLMDgv1lh22bubZwtjEUiVDBiqDUBDbAtFMcgSm/3Pd8ekcuSm+S9tSk2GEHeRElgPo8HDyjvY30uWbPgwblfgT8EAIfNZC47Y+xGhocby/RfS1mDckIskrfILQ5+z/7zCjQDFDyUPCRCGM57/a8vQqufi9SSzqoDo51CF0aR4J5v6N3ybPW7vhEjZBbPQlrc+rHG/RjLI0HHjqOQYTJOHtnLfhpQsn2VASJ/3RzFu2MReKwgBJ//rBghwhyZRnRQquOge3BTEaDbIqoppeXT3si7DHBRgoTNa8o8RCg3jyNxpdMnQZyOGhF2U9/sPUyWxdlWvYSFp9GPyYjhtGVnHv/MuvG8hd+3wamSLXLQhZ9nff9EtupKI7hKantLi2V7bTjpANkOjounHxf8SoX0KlKjFcAewDs9hRy+GgFG+jZYu/4r7OwiCNGLiPBRFDtPJ5tYVofyY/O6UnwGicxZhkliDOZZKmZc/Jr+6v2qDNq1e/gA29pTbtxQ383ikB305EvyG/Ia6M4IweEfVC3Igqa5KAAtTuspAUM0sK+v6nxdO3BZcA2yECJuJ5c3Hy/lUcq7Eo/Qu41bhEOtwinTfL18FLaaM+0u06iT2aezfkqoR45xLsXHsS3LidcfHV89VmEjpREZxPaQSB1Med2S279F49qHbvAKhump4Tww9FcHzlXdfgLMqDeW98mxn9lwXJApIzg9k2EFuBXLwltdFQhmLxKC2DLfYrsxCrgNyEXKnEoWEjvDW4LFibjN/ZPaD8lnWMCdQlPK2i0TOrmUn/3MQPdNzZNQQAHaX61P4dCp62VCYPr4ScaURY4Slo4HgcD94LI+VmA3+93AjVA/xOPa6xSGRZnP6ck5kmOYAkqZf67kFgaUeTtYegJ/vFNdKe4SWnQjPmy0wX2SiS8aXQXii0zDV5MuzLMt23NblEZle/A5ifE3OAVbHOJMGUe3LeEsbNYwNI46/DSBxUaAzNHh/ox5lwceYCuemYMWJejrD6SlzWDJEPkka7zZBqEh+/Qlih9Og8ocoA6Dyd61L9A006ksZsyH+PmmdGohEnXSlV5tZAPlfPM0llwKNwexZZICMcHtAWUQzp4nYnUM8PuT1SM626pNNxZu4PbOlEhcCOPGtPXRiSpRX9QuVTIcGno7/URgBkn3eG9w== 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)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ycagm2bgr6iZ/tQh0OMuZdS8BNzS3JiTBIjdFISc+jq7SI/6YPOOyCHjSKoqvetVaEAJM9aNGJeyFUcSkvMcoqsytWgbKzxddhE0eBnpigl54S5aYvAiT6pSrEl2qPQgl7kE98jxgy7hpAP6rR+9KCG8fcJ6qUOCNw5QUN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ZzRYpx/LfKq+nS6kq2evjQMPUA7+4IZ78Q2wvVSHfowLl/49x4UQyrOqPyXYDWoUkInGJXCktUFWk0ZtsOCEkwypWEVlrXnQ4URsvrJ+xD3K8Ps2mtp7UJW2qH8t0ehsH6h+DDc1+sLpdOSnbP88R7WTwKhusUxrI/rmCBtRrePSIb4Feygy1iNj0N4PHBqVuHYkTMB4faHwmOsNdB5SJChk/vH1DfevAMJREk+FUsktSj4YLCdN8pbP3jP6V67RQKYKchKv16Hzkf7jOkPdAfCi0NQyEW1R7uicDeXEZtqLbaP2TXQViBw29vneZju4RonfJ7Gpu75BkX+UxxyqFG0lc4/q1flzoxDCAfykwnnpemdhHzK321K1WmeHO4cIGm+iBHkuI9CmF+E= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: YKbrFAaLGIG/HTeukfjRLIc49EaiepX5IBcYjVGxFMDa9ICbAJSwmHlRQ9s+MllqkSyU637F49Ct9lLCa5Z37afNS/gQyoucHnZRSac1dc9u1bP7zVQpneWvmYUrNF9pRKejaL5RF4KbH/gYBxRT0XWmsQyupl49vEk69M+2MgsUAyHWrMFj3yq/qk3kuopXgRLY5BaNl0CNIyoYtP963/waq/MVRr/7nutPOhj+Mpu4zs4UzgaBSYYYhoHfbdglRVoUQTWfiyYpbCxwRhIvsRuHgAKtL3NkWtC4fKD6baD1pdnnqgdexP81wez7iDneoxAB3YkfcZZ0byhpG23z86hAUspVEBIXb/6f4pS3TKpohmty2cIQOkztayP++26e7zUyIQhrF1RikTyeWHWHriuxHln9xO0f25meTMVnvZ3e7ncP/6rQfVkr2N+A1uC5MEk3UYrwhmYZI7miwpz4vP8Nym3daLIkVu01Ad2Pc15E60B86fb343LOZcq0BY7T4u9jiPnvL7p6PgzBdwv7F1FkceCc7Xv0xQa3Rli9SFUCHNysiO/gASHRRWQoJX+DfwwPf2CUK/luQG1A2CRxMVdY147ngj7UFuLdubV/TKc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c1b2a79-7cbc-4d59-d95c-08dc84bdb511 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:30.3087 (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: 28sTVdoYgGp2d/vQuPtCKDld9SvwYHE8tdslpLKVSP97AUI0DHhm0ynaD4WbXWfd+21Pm4tPlVSy4yJZYguJRz6/rxQoDnXnWqh2Qg/yg8o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB7593 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 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406040142 X-Proofpoint-GUID: auNnVvWluD28L6jy7NFku5XcrXrWOj0I X-Proofpoint-ORIG-GUID: auNnVvWluD28L6jy7NFku5XcrXrWOj0I X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 4F70B40005 X-Stat-Signature: bktbtttej3kemg6jgc1yt3bkjaupscqt X-Rspam-User: X-HE-Tag: 1717522963-923374 X-HE-Meta: U2FsdGVkX19Ew3hPX3Xm9EzJoAh7rJ4DyAZhKtDn2HO6nlObbSwaVAwvLaZQ/1cBPNKw8lgvZWuoFKpm/u+eJW6crz2Q8Pn3Ip/Gfoho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Fpouw91IfErn27JAbZ7VSvoUAcrmL34bqthBGq9IWZ4ysBmkP7APZHhReIBnpIVyjvQKzIAUUmeB8kATh8mryL7ogfe3YVlclUQ78u93BzZ70/dkPDU7ZzZwVwHY26J9SIT+J5nOuzQMxR/G2pKqy2/L59tK4YHJ5MtvtDkvSCjCl4LE/9tP6t9X+CsFNWZT+jchSgW7uImJkmoHxOYUh++v6aFrKUROooy1Pm5EnN+AaAZb0/mNQFAK/+B8uAmTwlknsFSEVYGXFgFY4gAfZmeIFP48g== 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: Users of mas_store_prealloc() enter this function with nodes already preallocated. This means the store type must be already set. We can then remove the call to mas_wr_store_type() and initialize the write state to continue the partial walk that was done when determining the store type. Signed-off-by: Sidhartha Kumar --- lib/maple_tree.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index a90512d15549..eeb8def13f63 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4028,9 +4028,6 @@ static inline void mas_wr_end_piv(struct ma_wr_state *wr_mas) wr_mas->end_piv = wr_mas->pivots[wr_mas->offset_end]; else wr_mas->end_piv = wr_mas->mas->max; - - if (!wr_mas->entry) - mas_wr_extend_null(wr_mas); } static inline unsigned char mas_wr_new_end(struct ma_wr_state *wr_mas) @@ -5595,12 +5592,23 @@ void mas_store_prealloc(struct ma_state *mas, void *entry) { MA_WR_STATE(wr_mas, mas, entry); - mas_wr_prealloc_setup(&wr_mas); - mas_wr_store_type(&wr_mas); + if (mas->store_type == wr_store_root) { + mas_wr_prealloc_setup(&wr_mas); + goto store; + } + + mas_wr_walk_descend(&wr_mas); + if (mas->store_type != wr_spanning_store) { + /* set wr_mas->content to current slot */ + wr_mas.content = mas_slot_locked(mas, wr_mas.slots, mas->offset); + mas_wr_end_piv(&wr_mas); + } +store: trace_ma_write(__func__, mas, 0, entry); mas_wr_store_entry(&wr_mas); MAS_WR_BUG_ON(&wr_mas, mas_is_err(mas)); mas_destroy(mas); + } EXPORT_SYMBOL_GPL(mas_store_prealloc);