Message ID | 20230518145544.1722059-33-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 A01D2C77B7D for <linux-mm@archiver.kernel.org>; Thu, 18 May 2023 14:57:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3FAAA28000B; Thu, 18 May 2023 10:57:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AAE6280003; Thu, 18 May 2023 10:57:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FEA528000B; Thu, 18 May 2023 10:57:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 0E332280003 for <linux-mm@kvack.org>; Thu, 18 May 2023 10:57:33 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E364DC02B0 for <linux-mm@kvack.org>; Thu, 18 May 2023 14:57:32 +0000 (UTC) X-FDA: 80803679544.18.8E3BC2A Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf15.hostedemail.com (Postfix) with ESMTP id 7BD76A000B for <linux-mm@kvack.org>; Thu, 18 May 2023 14:57:29 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=G5Ar9Xc4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=teoqPESH; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.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=1684421849; 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=2YVRakESH/s1ICwCjt2PceIsUR1vzhFGi+kMxu5HLEc=; b=3WUFPpId5nJODuy1V9BTX8O+cubkZXKFVTFLlDi+MDeUVmKmYMlb6bLNnHKgeAFX+YELEV 1PI9iy7eNooFgn+Tcb4mJO7kmEre7zAXrsSa+NjZeJSTtpkrP77aqcjU5Nmzbzg6KaaXvf cTZilI0KWWet2YRVNxT1Ib9YM7+GSN0= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=G5Ar9Xc4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=teoqPESH; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.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=1684421849; a=rsa-sha256; cv=pass; b=Q2zaaKFhVZGDwJnGfRx2qi9m1j9n8ckWYozj/sf4gIgKcrdaT8JBT37wa5CZWJL1IMi+Sd +z2RHe/FsMjBbvSETtdJTXA848PXTLjahD+MN0VTSReotmryYgMYS+UF4cxjvLeEYzrKF3 ebi1JXLi2q1qAfwF8hiOAu+aMcgHFPI= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34I6JQvD026628; Thu, 18 May 2023 14:57:13 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=2YVRakESH/s1ICwCjt2PceIsUR1vzhFGi+kMxu5HLEc=; b=G5Ar9Xc4wZRZ+JDgd9WLGWNeOaRPt8sBmEp8/J/T4KHHswRArG3PiOtcro35uu/Mdw3p L+W97fqR3kg40yd/oMsxLyQIyooMpHe56AFtfX8rlEcUfycYTFBTE3y9PFKFTxyDH7Cl CjLMTk6GEo2RVRbxVfbQ2MWVIrM1qpFNwy/m0lmNMNRWENcW5W7uiX+NqoZ5Y3V8KG08 0EQQqy79Sb25pgVrE9z9muoZPXc+RlCUPnJeT8uYfeS9Haa4wX2dGEBXt3UCHz3oBchW GBLf1FnDmk7W/4O4Q+OxYwuRHeOkUJBQufz3TiUf2RKpL4Obx8ZLz9ZTloBSNxypHNJy kA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qmxfc2uff-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 May 2023 14:57:13 +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 34IEJepY036702; Thu, 18 May 2023 14:57:11 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2043.outbound.protection.outlook.com [104.47.57.43]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3qmm03w4f7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 May 2023 14:57:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eRzApWUsXmPv6VbTzVgd+0sdldQnn0LBKiXPdrtbaRcBE521GlS4JPl7LQYxrnRxzn71tE80rd2658JGPjnUXfTKATwGBc4t7kwMZhWyGnpHhuSwKw3y6lEea5gN4zYVhSEHc8x4an8K2NYnkU4EinI4qTABs8UpbiWarPBYFHhVpLit/tD25Q8LdKRJhO+hvwrVv0mvL/EsQZkVEjXArD+d32l5fqDV73vP6PJWiXioTSVxtQ9Emtk8VPO4VdYucSUHJ+XXp6XxuuXc7cnLk0wzS4NVFvBFBHrb5Hb5QDFoW6eD5kNn9PS1bP1n7tvE6aTav/Q/h4+HWoRJpaVmsw== 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=2YVRakESH/s1ICwCjt2PceIsUR1vzhFGi+kMxu5HLEc=; b=ib1nMNbmmL0yfPTXaj1Z9DtQD/3cjuDPSVT9jNYK1lJZ9B9PqucNRZ1Lrj8t3c5gNiE/qZk5AfPNUzxW2scJEgJEZXne6fLLRXa6hi6bK9eHvibTmQe9OKjcib2eGi7svvxkEqQs/7M2CS+A3SwVc0ChA3LgPO0k+xtMhDniI1vjXOVnRxq0Ed6UQwL09gkNwwr6V24p0BgQf1KWirg7tXf5wt+iBkk0NeNb61XFJKTWAT/zFJVk3IIX6DSCOZrmWXyAAdCqGgrLPJF6P6jEeq2n1yU6EGUBq0t6UWol1plknKB2aiX94NfBpHASlyqhOJ45pBfLTWx1HyycvNWQMA== 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=2YVRakESH/s1ICwCjt2PceIsUR1vzhFGi+kMxu5HLEc=; b=teoqPESHr89IHaOWwEAKn9MUNOy8cBPHm4jwYztUyup4INjMYIMlfNxpQ2ZJ2hj4/8HBv1DjBCP80biENEHPgt+LSMnBytgTU7xc37TguJAsMMmFFYAhzz+c0TzsWp6BtPRY1moo5N6eFIeeJaDIWY30nuvaS/oJGJVqCAoEaiQ= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.17; Thu, 18 May 2023 14:57:09 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d%7]) with mapi id 15.20.6411.017; Thu, 18 May 2023 14:57:08 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" <Liam.Howlett@oracle.com>, Peng Zhang <zhangpeng.00@bytedance.com> Subject: [PATCH v4 32/35] maple_tree: Clear up index and last setting in single entry tree Date: Thu, 18 May 2023 10:55:41 -0400 Message-Id: <20230518145544.1722059-33-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518145544.1722059-1-Liam.Howlett@oracle.com> References: <20230518145544.1722059-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4PR01CA0131.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d5::28) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ab5f90d-1f66-4183-a940-08db57b0274d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RRtO07/Nhzy++WCs/z/sWpJbwp67XBt6QC8xkfzh3LXdExubo2lrsQmVsE2UNktvvuPm22wliZNLwYX+7x4STrRHSvbHlOkzRkV18EzhvIU4xLhzBFk5s3pa22EPPDyA1K6CAUvqtboHeD+PcKx0n8tol/ZWDDRcyHK6atHgQEzxgmEgbiJ5PNrvXFxT9BGKjBKl2A4biPWU8P+cEIpmXRcl19XlCI27wLQQsSOYjCGAmdKF9OAGUE7CPbZRg2vSh/+chKf1Gwx3k7YKw+tgy3TherpElk5o9XuXzAgHzXfWC84QAh32lZ+EmNDu59alZouKOjB5hDZMG2TmBhdj8mWEgkmh2sS8/GSjkbY4jyVS93QsB1J+oygYxq93rJ4DCuTRglAF/E9icp7tiXcPW0+i7R+r/GRJDWdSnKMq46CurFw3MOKbFjCO71qRCZKuDTjooBS4Whyf8p29rW9cr90LsXZ7yTaJHSeNf4IH2TOrpTjiAtEhD6+YT+cuCGTSs24a4K4oJfzz92IPlIO/6VA5+VDhj1AE3XUm6/MshnVSiWiMSjzGEmhj71n1cD3E 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)(366004)(346002)(39860400002)(376002)(396003)(451199021)(54906003)(41300700001)(6666004)(316002)(66556008)(66476007)(66946007)(6916009)(4326008)(6486002)(8676002)(8936002)(478600001)(5660300002)(86362001)(26005)(6506007)(6512007)(1076003)(186003)(2906002)(38100700002)(83380400001)(36756003)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /VVapN5yMF50l9fFsQevuqQedAsm3rR70BvILbkl9XkHot4uCk9B+6AUXNcG61KST5hPGONTxy87acc+mbX6al/eE7IGVhGDVmnQ0VLG6+NFqKP6K5U+/Hl91Vn8G0ukZ9YL5J7pMkkhmd6G+Z6V1TaVXM1mMx3JSS1vkjNbW7CJ5qF2uLBF8VQFhT7DAqJiVaF+TuKZrXhs0X+zJk7dNQKJT2qjDHklMzwbVxLlbiYkVAovb8AKtQet/ia1NYW8RtA81pz8ZomiQezWE8yQgZ3LcQI17mCv9MZgcHfYm5ITwS4ae8uZSbLLiWTaC42qzUZXs+UJxeETFIJDyrw4WgRDpvBblTvWoIsF0s/t1+GGPxnNskcKl5IwwypYIFMyXo2WjNYqpzQzWYaXQyeIyAmQhXea8ieLtvRKzNieBrMPWK/nO2jhjWjmaHIKbXSKt2V5YqwwNjNuReY5p0deX61HuzhMYOeVnsHLhEBCf5SyXsp3bXkiIUGYphSM469L21cTCjVjOFPXNIUr1HoMz3/w7ZmBIxX26aYqOFRHrV2lje16wVPXMSfNjReUEVrUR1oz5g3ZrJrMmIDDREV0yeWw9iScDhWJ881KkDdWdI6DSC5ijh7sj7c8feKvynrnOVcJaIdGMOV68MtfdwyUlwTyaSYjH8AK3MU3mc8ssXM97Q0SB9Ax1exxrV4LHmdFatST6xGkCaNOgzkwqZu+uJTq5tcS4gCmsObqPkVIn5qfrbd8rKKLP+6aqB2SpdJNDGy8UZxOXRalV4hcrpH6lowC3kk8xUfC1yLb04nUUdkRgY4SRebFggUMIWVKfBGyr9qYZu8sF6eZeEXqC8PgJnJ3F9qRiuINg+xhHjY1ipincuHjrPjuC15TZln5Bvpf1riFiFE1JnZUyJ5M0HaHYGnffW9+8mrgc+sh3G1J41wnyUAQAipVDmZhWcVtnNPvA3UMCniMd/ssPwUiuiReODopJqNn0gysVAcDnSY7XCI5473B7vsB0Tg+gNLbqeRlzzcwEhc6Zua15MzD6iRicPyvGNLJ/j/iAfrYdUya2S6OaLXX4recfrbPjPA+VCn4A1KNcyg6J+4eBnFgGNKBdtxKT4tITmrPEqhrMP6qREGKBi9D+L6CFIYrVN1Qc7g5NcAKW3Q/UWwyR4scSzvvZ41x/DOT8KhB5B8RdHeNxbz6i9jef5PLxfNSKb3l/r9TwX6CQvCrWmrTwJ5JcZRrYJD+x4VGs5PQwXusYVmWANhINwpqozc5eIoRKjat1aCRX3PzuIdYeewWw9Zas+LJPR00vRsjIgFZz8vdJMW980kkhpwwnCgxidZF97F9wFWuLA/PogW1ZMxhwqJP8nwb/ihAa6VyAu0dRjIlowF254slBJJYNIVtkOlXfy8nQ5ykHSudWQRs0g7AOF0MX6xcRahgo2X1dy6O1zKTxZj1GvZu0Yvzl0eQVkDBzJmqY1LbH8HTOGuZuVVJRURCsPmfmcEDlQUEm3yIfWFTaDmTyUu0egu01BMpE7AFbASYwKunWmQKqHmNW7nziY9QryDfJdZ0rR0NHNgUyRj/dHtVIaMwp0fLHOjfC1QRNrNTrG4Y2vOATzeXW771n1tt4emBHA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: q+0rTE4w9d79GNjwee0KL/KLLUhoxkJhiiGlqY+VwvR4Sd/GfbVAObm3wAfIyETDxx8nAzvlRgZiiZesZgAoxcXt/UOFVadV6hTGmiDF+xEI3CymuxSb6d3KK8reLfCte5+3StiES5/A6hn02Z/Kj8zt8BUkZTd2C910xjuRkOyWF+5N9910KmVMoQd0nfN3y7TlU+dnQn2k8cER/qwI8mYhabtAhSNBlTJ8REnLIDIRdgu54Q1Y+YaIRUHJPNJRn1vEh7jfTVDtPlukMrN/+39eUcQCXDl78U7N7DSiKAwzlB8zvDptX0IwB8aZBrQXmYOJeAYE4I6jIl6gGDakbR0EHNjHhF6eCOy9bSUr3cb8ABY+OsYsPhGt+qL3uOyAvBqHe0xVu3gUnw8StCiMeJ0/TcB562YGE0LsTfsT8eU+z4+XQZuO/zknci7DbxoLLmmuLM5CQc1Zm4CW08wjblDdJGMWwQcNqjinKSlCQFkboxA6TdxJapVUM91ljF3/zh5rJFuvdiSo0RFFpSiT8AzwW6qo10h1ccEFUrjkRoR8MvwG0+WCDgE5v111NumOdaEVWdthJYBq5ywnOpM+uk0XCDFLkfMEZCsvL4F9L0DPT639cBDZi6WB/N6ajSVMohQiiQYgjTiwG6VkdqYGkFFy8gcd2oWLhXX+xxLFYAenLlWGTLSTao6ActSYYVqin2o755/sG7mHdhTxYk8fifLzoJSzNM/eT2AB5spNPwjj+sajUPrV09aqQuAec4piEllbyZYveDmdl7LyXrrXGkc28M8w3NflbqXmncri0yjTQOF7K49qNPuPFKT4dOjHGRQF7fBJU67sYb2LlUBaG8c4u6NtuHnk9/e0SamT44C8PXilfJO+AGgikhZhIS3aJe4+JoN0DkxfauXGef0KxWJoa85su/Rpbd+aSpDVB82tgnVbRdDq/tDTsk8SVCf0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ab5f90d-1f66-4183-a940-08db57b0274d X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 14:57:08.9360 (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: XSSGbwBLvcdE/glxqAZoH8DR+FTceS1v65A4Blie/sgsNLpyDDLkEMait4NP+KHng5y1K6SZdaWLFphqbejlmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-18_11,2023-05-17_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 malwarescore=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305180120 X-Proofpoint-GUID: -je11Ztu6r8Uiz_XU92f1zpGVMhmsl5F X-Proofpoint-ORIG-GUID: -je11Ztu6r8Uiz_XU92f1zpGVMhmsl5F X-Stat-Signature: mbzhfopixap88eigytqozt4tfrd7prdk X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 7BD76A000B X-Rspam-User: X-HE-Tag: 1684421849-745919 X-HE-Meta: U2FsdGVkX189afrF/RcdQvsGAn9z6BHUE08wYi8KM8WubGhPuyreCM2CV4Zf6nwz0pfA2ij1P3gzkfYDBV3ujaCHcKxV1+9wYmEHJv+VpjPunBL7aLMakkNor2AY0/4QZSq5SOwpt+mbZ/zTSy1js9Woyj/L9zneHvEC2bywjyhbvFUUgHnn9C4Y9/zDxHuOtum3iEIuylv9q3LDfxNqhbIA3YWYP8ZPwknkcapbkOmUKh6u/tK4XDCYXZXvV7BBgjD6VS422uz7c6mC9Pc8cPBYXR58NAAdvhp9fC40AZUcnzNHWnxxajf5uGQW67mMeFOjpsJNxMOu+LbtXOhyVQTseSWdathQdPbsEUzFV+V3FGMY+MVvZhkgHxDlJ0RZsjUWO5SePafoiO5hu+WATG/7G8iyt5zHgFKr2FBV3m8p2OXEnNKWntePAiBaM03xlOdgnQ4fLNqaInmP5khuMRC7Hu1+/ruu+SgXxDOCOa7/rghUNv2efw8Vjij3FRZQmldVqR18vUDdjTacHlnuPP86iBu5JZZscQnZp7EefIYKReDzwlIT6H9Majvm465b3vF8P+uKBa9PwPAYZWf7RTpWQ69uiyBYTlTAUdzgSuk6yMfkYtyGQQi6us7L7lAML7nQSzAcm+kVl4FMtHmg/UzsBKvV6vAyQ4wws8oL+eyuYAFlsvP5pkRcKtQZ1553Ezd5fUx+wTNP8u/JQI0a9CyBL7qun2vmga55tIJpsG/WT/05kdLPXrG8866mk3vFVENoQ5CRE3ny//z3Q5z7xjtl49nbTw7NfQbty5gwbAXFTWBm7Fp+Pcf+lJOm5Z5ysgNq4gtDT4nRV0zcXBTYuvC1MbfM7I/BtRxO9777HIjmzkQy1ekhcaS8HcgF3JOORpg5DJeKx+Jfd7XrYHeZ4GDVhucsGYmPIhmyndVwspO89k6pdpjLrsK8q01kQuGfg05UN11NxgOCIRq9yd/ +ubyDMuV EiDO8F1BfADXs2WrYtivcwcuKBOGsMWaLTVRVWG5MYbD6dzE+set/s909qJyVVIMedRpJgvkGP8G356eXww9l7lHRvrS6sYmi0vlzhO8981Ka4RB2TBDGGvTmHJPAJLEeBtArBtpyLB0pXF2UW4USLAQn0UlVHl2/EYj+uo3aUL8ZekTKtnFvatTvebIThGiSuChJa2lRu2V+3iIypL+RBVtMMNZk44OxDTG9Q+od3/ohfk3qPT/Zq1HrGO9yRrPyH5ozCIaNF66M94cjvNj8B7frtGPcRflu+Fpz7cf3vMqkkTHoVjTRtzUuYIwlx78st8unCz2whn3Z2eAS72cHBNws9O88+JnKmbCozoPRzkDMB3HLx9Ur7VNyICZzCzUaC+LpQp1jqedLkMMiz281s0s89lqxPcgGik2vp8FbgcYy0Pde324R372q6rzWjthe6kp4dlqXW1DsEJrp5d1sH+0p9ORov5oVztbO 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: <linux-mm.kvack.org> |
Series |
Maple tree mas_{next,prev}_range() and cleanup
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index fe481d4e5e6a..1e70a1b0c6f0 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -5022,24 +5022,25 @@ void *mas_walk(struct ma_state *mas) { void *entry; + if (mas_is_none(mas) || mas_is_paused(mas) || mas_is_ptr(mas)) + mas->node = MAS_START; retry: entry = mas_state_walk(mas); - if (mas_is_start(mas)) + if (mas_is_start(mas)) { goto retry; - - if (mas_is_ptr(mas)) { + } else if (mas_is_none(mas)) { + mas->index = 0; + mas->last = ULONG_MAX; + } else if (mas_is_ptr(mas)) { if (!mas->index) { mas->last = 0; - } else { - mas->index = 1; - mas->last = ULONG_MAX; + return entry; } - return entry; - } - if (mas_is_none(mas)) { - mas->index = 0; + mas->index = 1; mas->last = ULONG_MAX; + mas->node = MAS_NONE; + return NULL; } return entry;
When there is a single entry tree (range of 0-0 pointing to an entry), then ensure the limit is either 0-0 or 1-oo, depending on where the user walks. Ensure the correct node setting as well; either MAS_ROOT or MAS_NONE. Cc: Peng Zhang <zhangpeng.00@bytedance.com> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> --- lib/maple_tree.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)