Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp911457rdg; Wed, 11 Oct 2023 08:49:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkVkvymrlcAZGYrcWX+4BJKjTm6ta6txaD/bTS2Xk4SQVmnyq1Q3RHuMg5vRr2tMoRcN66 X-Received: by 2002:a17:903:124b:b0:1c8:791c:d78b with SMTP id u11-20020a170903124b00b001c8791cd78bmr25143755plh.29.1697039379663; Wed, 11 Oct 2023 08:49:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697039379; cv=pass; d=google.com; s=arc-20160816; b=SArU1PBzIW74LgZzLl3+HCuVMua7QS0hAWo3/tWuUaRgnw53KUbUUHTg2pFnc7blLC xfzRHTFZ7hyLuFnMKWkx05vBv84BmbfAOEDU9PNOzYi2qJUvBNNzrhwaRa9JxjP6aFBj /zP+oUxuJnjOr7pRO0zuMgoP0XWvRg33CiUf/fdSkGIKw1fRJPwtN6Ip+1GEFmX3Z2ax L7uf58RCcJIvSPiUR4BTsL3rh9WGnErin0z2dB10OLFWxO9QqL19mixU5wWEEyT21hf3 M5/vKv1m3C8/wxbl51x4xjDpjJGkMY85zS2YgfM8zTyPI/ssfgUizRF6dya/X+eoh3BP PAOw== 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=5niBd9r3/RYCTKzjTkCjWxYo3yOjuQ7zMjaahIoqBuY=; fh=jcf1UQMSW1zOWvDMChstz6F+05db/frAhW07QxYX4sk=; b=chJBGmVIAu3Vs72RQWzQ8FDb9sDTsA+VOVHlhrI0pdK3veAXAh+hKRmTXxV/B377lC hippWdcQJH1XidP2Z1XPxiEZ9+S2+3rTlZfWtclwy5O++yBM7QhH+ESPtjFI+g6vQB5a C303Kl/F7Tr2c+O3Ko6P5dpytDvQ9C528J4i5o0YfavNjAyGdp93mxaoYeyGDEq4ubuW cDWlgjhq7y77sdAlBTKvHUMDWOOm9w7dzR8ZVnCZbItod3xvfBJDhS20gfnPty5Feaau S/R6h9b7bJ6QJZFlYNlREvXMmeEZEopK04Pnmq8+GMtMErwyAgvjiPZx1u0sl7vgq6vl HiOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Xdm5WfVo; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RzCJMBD5; 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::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id h16-20020a170902ac9000b001c60de17b5esi1247plr.118.2023.10.11.08.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 08:49:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Xdm5WfVo; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RzCJMBD5; 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::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1C01D8185945; Wed, 11 Oct 2023 08:49:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232772AbjJKPt1 (ORCPT + 99 others); Wed, 11 Oct 2023 11:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235095AbjJKPtZ (ORCPT ); Wed, 11 Oct 2023 11:49:25 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC82AB0; Wed, 11 Oct 2023 08:49:22 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39BFeR92026964; Wed, 11 Oct 2023 15:48:38 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=5niBd9r3/RYCTKzjTkCjWxYo3yOjuQ7zMjaahIoqBuY=; b=Xdm5WfVoL7k+Tt6F7CNhZWV6XsG4LOG22AIs7tSpP8ZGiGnYS8AGa07XMABjX/obWL1u HLyxmo3pi0SmbxN8P9JS71gBhhwv/jxN7Bxsu1c3P6p7AQs0LCqPdCvqmqhTOHlrkSt4 wkOoHna7+/e+uBnranUIbg+AkH6RFtusA4QISnhIFcdtONGjrOSDKGB1zG+S/+QqaFdT msTKfB1y7+n5VORPagJ1RexbOIif0aQzHvEPCJBUzR5qPUydfBd/ojDdNCBfaP+9Mqav H/t2599NbIrUzaZ1K5WC+1pZx5zKJ96NuCwbKaHE4zYLKoW8rkMeRP8659msTqHNS+D9 HQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3tjyvurduw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Oct 2023 15:48:37 +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 39BF8elL035225; Wed, 11 Oct 2023 15:48:34 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3tjwseh12m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Oct 2023 15:48:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lr9SITUDDndjlP2fIySF7G7vvjZU3tdFqfkPeLYnqJStB28VWbxbsTlLDs7uva39W8fAj3GOY0ao9c8waRHyvvBgdEVZF3jLffGqLXrOGzKrLiE0tcxsEacr9x9GfdLXDaWppM3Y/Is/gk87ZVUjrb2WecwCvMKuoUyiWGX4AfEKyY8mioBOXaYxWXPiHCq6Fo9hSBXeo2aoUGfP0a21i66j5DGMIp6KgHyD8moO/+Uw5Dv4ax/D6SSbV9PnGqqYdvirIta/KgcXUCv874v+oUQHVdCgcsXcKp+LSqhxmavECmjYyQ3AahOtsddHSuPuRWvQWOK/AIVvcFPqaPJlrA== 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=5niBd9r3/RYCTKzjTkCjWxYo3yOjuQ7zMjaahIoqBuY=; b=FYvm6ZEXA/Xi3rDAg3bjAfrA44fjPZbcadkrZr28UKvQHO+nfPBLtWVRMuH2LlSj0E6SbyWHJ9Y4sTDsm9fBBZjjp/gvQTgK6uFkdY/iGb5oX556fbmOxkKpYmXWJXQ3UtjaiNvtOXgBCUfDVmkcB8xlOuvpahVtytozkGFQ3e2/aibNiBZI/9h1CizlGGw0iRndlxBG3BjG0KKDIpJYvzFt+jJjznbxFgyRTTCH99PrI3bzvVwdSVqokB1IwrXdbcsFXvhpQwiOOxdfUlHJ3ksXolErCHIm6yK+pgcB9nZpWE3aJCDM3NPEE2jfxIxzTB1toYG2bevT+szEmvmNjw== 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=5niBd9r3/RYCTKzjTkCjWxYo3yOjuQ7zMjaahIoqBuY=; b=RzCJMBD5CdVsjsis84yc5Kbpe7zJzfM/G51aQAN9BlzbqlDx9tJd6J2CBXy/W0obyf/Nset/ve3NnKZgSLp6OHkEgtv1z3L2OHvpzu3p83qa28sLKJy6lNa8v78JdVLqLgUMnlTPuXUww5PsYgCgGZvvkewi8OzQ8rJ1ZI8T5kM= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by DS0PR10MB7362.namprd10.prod.outlook.com (2603:10b6:8:f9::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.44; Wed, 11 Oct 2023 15:48:16 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa%4]) with mapi id 15.20.6863.032; Wed, 11 Oct 2023 15:48:16 +0000 Date: Wed, 11 Oct 2023 11:48:12 -0400 From: "Liam R. Howlett" To: Peng Zhang Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, corbet@lwn.net, akpm@linux-foundation.org, willy@infradead.org, brauner@kernel.org, surenb@google.com, michael.christie@oracle.com, mjguzik@gmail.com, mathieu.desnoyers@efficios.com, npiggin@gmail.com, peterz@infradead.org, oliver.sang@intel.com, mst@redhat.com Subject: Re: [PATCH v4 09/10] maple_tree: Preserve the tree attributes when destroying maple tree Message-ID: <20231011154812.d26o6iqxflbmd2n3@revolver> Mail-Followup-To: "Liam R. Howlett" , Peng Zhang , maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, corbet@lwn.net, akpm@linux-foundation.org, willy@infradead.org, brauner@kernel.org, surenb@google.com, michael.christie@oracle.com, mjguzik@gmail.com, mathieu.desnoyers@efficios.com, npiggin@gmail.com, peterz@infradead.org, oliver.sang@intel.com, mst@redhat.com References: <20231009090320.64565-1-zhangpeng.00@bytedance.com> <20231009090320.64565-10-zhangpeng.00@bytedance.com> <1632d0e6-2d52-43b1-8a01-056231c0819d@bytedance.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1632d0e6-2d52-43b1-8a01-056231c0819d@bytedance.com> User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT4PR01CA0214.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:ad::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_|DS0PR10MB7362:EE_ X-MS-Office365-Filtering-Correlation-Id: b73d572f-3165-4cdb-cdad-08dbca717bcd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WXaMvXdN902PFo445alSbG7odpVWrUVy0kI3VrKAt/fiBCFk0ZtMTcEkTdeYbAu624l+F3ofrK2u+bAApeQrdZdjae9v/zJU2GG145lQKhWJ6+Lu4Yu22sWftwDT1YMv/L3sSv05Wr2XbzRMJGyR0vKZIURKnRaxnanLFa32ydeemcOA0Cvj48MmBbEMgnYensyXvPMhWOO1sh7AiOzF5Ntiu7vLzvRJ6vW/y8MHT7O1vs48XeC/0w25xXN7NW7wnCJZfB+Lp/tywwo3Zlu/Ug6AQLzI53rmGaNWO7kiZvlNyQkW94gUh1nUeyGUami/mkxxOpcnn6TM53ClVhkUxj96Ho0e7Z3tF0ubDbCZujOn7JE13tgl6mafYug3X2p/UcJ3Kp0fwXj1zwZ4EthyeIFLlvveLDZi35CN4BpYSDS2pQpE5zZxwUEdfJ2F5MGoIhhKpepgXzsIsKo02R7+qrldX7zcuGQw0xCxOrWlocEw2j2aCBf73+Ffd6DMSUnxxMl/8wgfndtDEU8VI9hdspehIPRstLsFyEifvPz1xRpYOx3dQyijzLus3ygDTZIH 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:(13230031)(7916004)(376002)(366004)(39860400002)(396003)(136003)(346002)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(66556008)(66946007)(66476007)(6916009)(316002)(8936002)(4326008)(8676002)(41300700001)(38100700002)(33716001)(5660300002)(7416002)(9686003)(6512007)(2906002)(6486002)(26005)(478600001)(6666004)(86362001)(83380400001)(1076003)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MkJ6SjR1WjBsTXNQT2oyTmtWS1NNYzV0ZGhsWlYxcXZRc1k1alFEQ2pwUU9z?= =?utf-8?B?dEFGY2svcUlFak5tOWU4eTI2SFBsZXBjRElseEd5Q2g1MDNxKzJkUFJBaDdX?= =?utf-8?B?YlRVUXNWUjFjeEVqNVdWQXgrVjBkZE40VW9lZVo3SVd5OTNhTzZsdFY0b2h0?= =?utf-8?B?M1NuUWUzZHY5ZzliR2FGUzlHbEtLb2x0ZUhxeVIzYzl0TWMwOHFXT3puS3JO?= =?utf-8?B?T05RVEV1clB1eWh6cWw3SXVlRlNhbUpWZWpWTHBUajNyd2RzNjVUZWZpK3BI?= =?utf-8?B?b0s2dmNtNTltYm1VYUdOUmZSQWRTTmVvTDBjMFFWSkdMRWZYa3lEK2RhaUF6?= =?utf-8?B?eFh2TTRCb1hoQjFrWk9sZzFJVVJGV3RaelF6bWFhUmdvVWZZc08xc3Y1NkZI?= =?utf-8?B?VEF2NUNjVzdWRUU5NDBGODlnd040U2pZMVB5NlY1bVpWT0d4R1J1bHNjQ1NH?= =?utf-8?B?M0xXZ1hUeTRub1JoVzhXMG9hcmEvRk1JeFJLZEYzSUx3bGJjQVF3bWJBa29M?= =?utf-8?B?L3FuVnhnK2VjMlRxWitBMG5tK1JnRis1NHlldUl5cnhuU2FqUUlZR2pnRS9t?= =?utf-8?B?ZFdjcnFzWW9YMXVTU1luM1NVcm5tMm53c0hHTVNlSkZ2Z0hVNkFnRXVTeU9q?= =?utf-8?B?SzlGV0ZXQ015R0ZnV1Y3QXBBUlRoUVQzM3BVVE9yUEpzMkVaVFBIKzZEb3FE?= =?utf-8?B?NVdiN2JvdUJPZEoxckkvM0RIbjJZampVeUpHc2grWnVZWnRaU09JOHNWZ2g2?= =?utf-8?B?RzdsTm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JX?= =?utf-8?B?ZVFIdmZyY25uclpVRjNjOHFOVFhuQTBUS01VcnJQeU9iZ1g4ZmRsenE4aU1t?= =?utf-8?B?TWJFcnJnTWJPKyttaWlqQUFRR0hHMWZESjRocmsvMFNqMUo4cmVPbW9PR0hR?= =?utf-8?B?bys4Z2UrWDVkUXhlTVZlSlVYeCtHQkI5M3FaUTBoWEVrdFlpemE0a0h2N1dT?= =?utf-8?B?M3Vpbk5CQlVsUDRzOEV2ellsZTVFZ2htL00ycmJyYzRMT0U2c1VnL0FLcC9u?= =?utf-8?B?aytVS1MreWRIVnJpd3BLRTBwYkExcitiWmFyUTJKNzJ6c0VUTUxJMHFEVkdL?= =?utf-8?B?RE0rUTZHbmlJZ1MwK0U3bVQxb29EQ1VONmx0UlJwZzJ6Rm9JVmJFMFpXbjRG?= =?utf-8?Q?FyU1+xDovdbM95tSA38Nfd41U=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b73d572f-3165-4cdb-cdad-08dbca717bcd X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 15:48:16.3121 (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: qobfbTjKGzL0e1nL2+q69t40qJtfBadnMWLbQ8mBRK/uJI2If3dp2nrrTRk/b70+b1VnpmnXNoqmAC9odvInaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7362 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-11_10,2023-10-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 malwarescore=0 adultscore=0 spamscore=0 mlxlogscore=972 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310110139 X-Proofpoint-ORIG-GUID: ZpuHo3Ii_ITzPvyi5hiv_5lx-RxgKGO- X-Proofpoint-GUID: ZpuHo3Ii_ITzPvyi5hiv_5lx-RxgKGO- X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 11 Oct 2023 08:49:35 -0700 (PDT) X-Spam-Level: ** * Peng Zhang [231011 11:42]: >=20 >=20 > =E5=9C=A8 2023/10/9 17:03, Peng Zhang =E5=86=99=E9=81=93: > > When destroying maple tree, preserve its attributes and then turn it > > into an empty tree. This allows it to be reused without needing to be > > reinitialized. > >=20 > > Signed-off-by: Peng Zhang > > --- > > lib/maple_tree.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/lib/maple_tree.c b/lib/maple_tree.c > > index d5544382ff15..1745242092fb 100644 > > --- a/lib/maple_tree.c > > +++ b/lib/maple_tree.c > > @@ -6775,7 +6775,7 @@ void __mt_destroy(struct maple_tree *mt) > > if (xa_is_node(root)) > > mte_destroy_walk(root, mt); > > - mt->ma_flags =3D 0; > > + mt->ma_flags =3D mt_attr(mt)If I put everything into exit_mmap() for = handling, this patch would > not be necessary. But I think this patch is reasonable as it simply > deletes all elements without requiring us to reinitialize the tree. > What do you think? Willy and I had debated if we should do what you have here a long time ago. There was an issue with the next exit_mmap() that would not have arose with this change, which I was going to make before it was made unnecessary due to other changes in the caller. In the strict thinking of a destroy() call, I would expect the flags to not be spared, but doing this allows for an easy way to clear out a tree and resuse it as you have said. I'm happy to keep this patch. > > } > > EXPORT_SYMBOL_GPL(__mt_destroy);