Message ID | 20230414145728.4067069-2-Liam.Howlett@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp382884rwl; Fri, 14 Apr 2023 08:02:21 -0700 (PDT) X-Google-Smtp-Source: AKy350ZYqyXZb6sAN7uIqA42gJpMem0FTyTPBJIAUYs+1bnGe9BQPSTRZPSUhtpxm24GBLSzX8L8 X-Received: by 2002:a17:902:c943:b0:1a6:6e78:9f7d with SMTP id i3-20020a170902c94300b001a66e789f7dmr3290286pla.49.1681484541236; Fri, 14 Apr 2023 08:02:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681484541; cv=pass; d=google.com; s=arc-20160816; b=vMsGs4RaV7HMX0IAv2bYoBF5qXHLLQrsyxYoWufPuCOm9meS1r+5GeS+aiwD7rhLO/ r2Aov8b7bIM0jPuhNyiCWgB98Wb4UrbvFpLSTZMJmayZ6vl++itnLwhezR7HAr/YXNSm VWc/qYdvmdveWwL3rcwJZ46TAMlS1fvpVp+5X0JDCDq3BmYybiQmOm5xnVlbIaWpbvTL 6253cO1HfyYDXTaVOT69TSkNEFCGoonQmFDYYyNb00E/cadMOjfd+9+Zn3rCbSbGcizy WMJVB+/2R1ffpx3RiQihqTgffRqZAe1XP8RI4ldC/ImHw09COHqQxfKZkEz6vrgs7Syo xHFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=vP+4LFQVuudNT+vgk5ViGBRjw7ZjUDxkA+sBSq1fDDU=; b=GUZkMSbkeUkHNnfjnfufnQRZ+qs7HEuJ/bEga9B7CR3x8ngZl7GsclUQOrcKvdc3IE VQV0ocpkUFGBiefhq//5CNWhPm/g48tRLfBihgNIkL78lPEDZmejpcqXIncKU9evt7/e FU7/vhTR0eTOhrD98iAvq2cxwM38qyLqvczOyy9BCZ6U9XbswMXQYnsUibfayrhYu3KX mRSRgbj/Bc5aT0lwnMQi8Z2fspAnq4f4TdpDJk+JsN9CZbaV3OU4ivdrsEy5OoAgXIyM /3gzIDvLyCz/yyA9kVW/I/dw3NqZF5k+P8alkMYZQmrgy25IUFXFyLEyekq2SI4MJrz/ M4Ug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=xQK7iKkb; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rnprVvxe; 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::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw18-20020a170903045200b0019f269f06fbsi4603326plb.3.2023.04.14.08.01.56; Fri, 14 Apr 2023 08:02:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=xQK7iKkb; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rnprVvxe; 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::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbjDNO6Y (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Fri, 14 Apr 2023 10:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbjDNO6U (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Apr 2023 10:58:20 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ABF0977C for <linux-kernel@vger.kernel.org>; Fri, 14 Apr 2023 07:58:04 -0700 (PDT) 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 33EEnVUf008597; Fri, 14 Apr 2023 14:57:57 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=vP+4LFQVuudNT+vgk5ViGBRjw7ZjUDxkA+sBSq1fDDU=; b=xQK7iKkbnXZBzchfsmfGb6VAj1XPCNbUbV0NGGq3ZjbFtPuBmg+46/bm21rI0DgqL7T8 Ri6UWS2MqHHvr1eU1fDEFBS6EdMTpX1TFTQcfVT6mEkyfGG7w4YUh9Dl6+HJwznkk6zf ry+GTHvNRSz33+TOkv0PgM/UHaoHoiyENYd0hNjYQTLmsKSVnjwTbp5yAZBw09M0TkdT 8So2mzVHX4x3AAZfSHwuRNrtAcofSXM7qGARBfgaEmIqCrB4WK3gGgiBRlmt1mC2OObe hq4udxo+OYwWU+jzJwUuvBEMTEjf4682XramADbRZdlou/zaid1HB+nN17MuDnNnkWyt Dw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3pu0etx11x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Apr 2023 14:57:57 +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 33EER87T037843; Fri, 14 Apr 2023 14:57:55 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3puwdu1pup-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Apr 2023 14:57:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f9h/KFHGjUpNUzNCiEkjhbJ2WuN384rqV9jWRpaKX7qAUDQhggKdx4P461j2PaOl/kC4fTi/73sIiIC2pqbYuKHm4uewInAtyBRdd5j9F8FeQr7GwSmG2WiqdStdcUMh4KdHN8JnW85Y6ldUEsSZa8qat+v7a8rJmRh/CAX9uC18J8EYHrx3PEgnlEwlPFb4EDkauHhIMgWauMsSARgEgkYO9JQYvie4PTCW4FqN9axqiG67A+GqhmMHFEDDo4lp6E6/BZg1Jan2HQB0Ek4z/yLB09wNEpB3jB9im3e58PooIpilzuOekiUX3gzecwkgy5OA8w4TpRmveAv1tejwGw== 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=vP+4LFQVuudNT+vgk5ViGBRjw7ZjUDxkA+sBSq1fDDU=; b=I0zSe1unkFhSj2poj8vmFYwntxpIcP/rRl3KsjMg7KXoBo37Kzc05Sj01z+Kvbn7MToTkYXlNUy31PkPr1B5JXCXyJfKeFJf8u5H+q2Eal4Wr8xhqDjvRanKTals+5F2IJ5fxd0oYAueRrwPpsfB4WfdnbQpEtpPN6j08aVtUCM1wiqJuFz7MosFxprETCbd2EUGerNPFQiF8cBBr2ia4CLlkpaH6CljBIGIFq/gNTgfzd8YJdLdrYnCrggJdijPZkBP+oFGnF+Ro6eM2wYD2q+3fLBZ49m8MjcXz20oDoeVYDF4HkNIB7U10z0tAhdrlW8e0gx2UmW1sehpqspSzw== 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=vP+4LFQVuudNT+vgk5ViGBRjw7ZjUDxkA+sBSq1fDDU=; b=rnprVvxeXChbeFEsQwGt1l/lGqeGl+BKg13lrA3weLEroRnTP1Ds0oD6JRSmmxjT9VWeFvgQ3yYaeUzo0V+FeGCSuuRIcnT31tHpSCDiDwy2rY6uZa1p8UkPhiom6yhFXSdMdn9F9jBGkxyaLpfNSGX+YulqUfDgwuitT8Fai3M= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by PH0PR10MB4582.namprd10.prod.outlook.com (2603:10b6:510:39::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.28; Fri, 14 Apr 2023 14:57:53 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8bb9:2bb7:3930:b5da]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8bb9:2bb7:3930:b5da%7]) with mapi id 15.20.6277.035; Fri, 14 Apr 2023 14:57:53 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Rick Edgecombe <rick.p.edgecombe@intel.com>, "Liam R. Howlett" <Liam.Howlett@oracle.com> Subject: [PATCH 2/3] maple_tree: Fix mas_empty_area() search Date: Fri, 14 Apr 2023 10:57:27 -0400 Message-Id: <20230414145728.4067069-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230414145728.4067069-1-Liam.Howlett@oracle.com> References: <20230414145728.4067069-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4PR01CA0407.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:108::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_|PH0PR10MB4582:EE_ X-MS-Office365-Filtering-Correlation-Id: 798cacde-e3cc-41ca-eb9e-08db3cf89fb2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kcNPEAtvmlInYIj1qEyCF5g8h4Twm8sXiiuZEYnLggpkv2LuG826RWI0mt6KPA4Vg50VeRn0/RbtsdweW5sRXxG/ChD9xbxAJfoGpeDcUVDKX2rpIjg2eduIgymwB3D1OMwkRVqS9kfIFsSzr05lPPyyYFe/OP3gTTgjBuCja52tUywvQ++AZVhhRr7pUAn68o4TwWSpPBdXUwAa28RRcZcv14m0kaTYXPPIdVrhvQNy2ovS2WPbkXXvkQV0B1TXLNw6okzIz3EYMxQpK3waDgXUiXdkNP23ozg+IzSVPCGYVtbafd5NqCjNhQgljotvQe8LXvAN9tHhMAHnaSL5Ui7QRMuCcoVvAANafcXEO/6Hx9bkRBQVPqkdOVD4Ub035uYPmTiMhqithuuqiV3C2h3NPjMGVdpPZpUOYo23X9mtUWxiyM5Q3y6pNlGHt1qzgeH9XkNBZkSmpMw9Be+gmq4cYYtZthkN2e4Pm9U801W6f9awQB1pif8gVknirPNKuirniJ34RgyZsBZMetidu0yGfTRncL69dJQoscb1LNly/Db0qCWwHenObSt310um 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)(376002)(39860400002)(346002)(396003)(366004)(136003)(451199021)(1076003)(6512007)(6506007)(6916009)(86362001)(4326008)(5660300002)(6666004)(8676002)(6486002)(36756003)(316002)(8936002)(41300700001)(54906003)(478600001)(66476007)(66556008)(66946007)(2906002)(83380400001)(38100700002)(26005)(107886003)(186003)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OtU1qLgMPPILyTCKMSoD+0/SP8Q/JeuvYcIsfuBJttlLIOsmLyRgd6R+0R9AUZU2eWUsLmUOMn9kA5dd582q6XprEv/3ZWPuIS+NoWAm2y81b+yCTVtcONQFk23oz3HpdPmpt+XIBO3KK/frqk1aef0hfEczG9rtx+F7QGfiplXDNlwt7vdB4vxj1Du8jRQ4SExvA2Feq+ndTPScw5cO4WBeYJkac5jSrHBkLkfZmfN2tyhTXl9EGrz2BTHvZLVSgsLj/pA16HXKgodN34DSctsTBoAqjwaEh/yBWIYFRuUb+q8z+nvcwnFVX4qBmDUNLYLdCl4/7OT0HRNDBFduYBTPzqYFHenPsFShvMR36IWMCf1rzjIzGVnFVLarUDYSUGRA9IAkzrI4aSi+uBbMr4GfCLbNPw6hj7qdxHC/4PXMiq+By7pb9Guh2faHfiAL83uT/3YIv7er2OtuAGmMxsgEACfuWBHn+pmMbo0/ImKJKQkjalY9JZUu/APy4QFCdGPTU+2JFlZj+RsChIyJygHaZzyeViqfGaudnZhrVT7w/Z+gb6wHhHYqftd0Ws4WdJxlP3biA2kql5AlBNze0mv549o7nUL0a9jd8+C+/cKrdRHkfqDq4ANFYdvjGOynjaBcxjUO+uq7WUZrnNpIebMEbpmQYPiUvb/hV2IgLirlBusd7MsxOKl0I26NNbFGpVvJJ/eWhgFMlXw8qwNyDxlZOFKEDPNEnrjQfcthNXO8cNQkrsyHQxaxPl272uwKtyrWrKjFEz8F1kZu6oTH/CzW1mUIUfFOEHzcH7heIROq3DrzN5qKarNxYh1Z1V8SvQhUVkGL3DR2xg34oUdSh9rwRXyiU6TuZHUSGJnJS+mbWl32YAMfdmpJ9uTqllgJstNBlgcOwNu3MM3Fnl+mGCu7nHRLtmVaU3PmZFLXgIiQqk1U1Oj0Vx0EJT08kXbEXaM0yUqUMjVb8/3yW0bJVJ8VmDB5WgvJftotfUebMmusWUaXk057IsMbuk5OlcgWUf0LU7N7Js34/H6nNhUaq6U8K24pVglg1+YR9TUoG6rSMkp4/OxsA1/5ca7bB+r95LbJCE8Xs1X+FWBqCjPdUYS0S1KQfxVgjiU8UPttQe3PRTHn1okUSkC911FZZ1Dv8WMElj7QTfEge+eYVroiRjTNs0SGy3rHJtEju2tIAjeeUqmszjIyNajNh3VXJQdEjT92B+viZrcn65ekhX88dXrNyuXrw+WaP/5bobPK3u8+DY/+m00MTdF6tpS68s9fOUchcYwIWvklQjUzD+TyoI3pyPLE89HcQIfQW7HMoSj9pksQYMIdy9Wuf41pgPuatMr5d+v56SwjfEl8Jvs6GL+xj7QkNrVZuP8ypWym8PBChVQ0ykmL8GkeYDabPfoY8JXTQGfW1Cj+OWz3mh8M9AhKMSbhYWzRJxKWWFaDHTXM6dAC5wgdEVmkXW8IknGcPYd5sFMa/jjQSG4Vm0qU7pz5xxf96pIYIsGmocGeE67P1OdDZsWyEI07UhiRvjiQmeItxRBcHDhyP7YpROG4IiufQC0xejVH3sXu+4at/f18/AUc5/q5E/kgxglUWy5B3nE34aYlc/IO222Mhvtjkg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: oDLZsGuDBSfaCliE9NHsFCq5825rhtNTNJZbJMR1j6cYccIh1an/ZUN7cs+izNAXpUJbRgtb0u4hNLA9oq3vWzkmIkvLZEy98U9ticNMU5LCL241bbenGSiUGl0kxsalGXZKWyQ6O+VAPz3jN8wTwUgntSrrKNLthorLkWs0ghzA/R1WeDniY6eVh6rg4JtTIYcQVkEsC2P+mTqB71emzkeWU2Ns+KcXGzCBaTfQ+WD22fnFQ202KnqXTDm6MlzjeRCDsfsydV4qLyg3I1xdcrdT3T9NizmsqVW1O5lElpnqcKKMDAYaa4UHgVGdnSml4uXRl4qyfMuENAMwFNl8OD1bFxwsmrXPaAInUgE/QrTfkrlB/fYaHspsHdk5+6hbzrOLxWDi5NmoVBi2N4VuJlr7jxtB6wY8ltemOmeFNzdMuk1lEQfrnyDrvw2oRGrArZV2fsILL3mG+K5DbjeIhr9E5DHWUFB4zwIgNsc0mVyodggxpWzUf3E5Ou4qkzm6rB9PWMs4NzRi6BKivvVgXmwG0iAYo7rAHxZgA3BUN1EMLGiA7HrQJTZ3zlAhNxmM6swmiMIxb8gdc/RbkQUPNa6S0gpxogakRgy109eJe9UM7tPdp2TdKe/CTF8Mtb/AWisGkUwkoog94yz1nGjtOifREBw3Qpd7quduqc4WS4SMmJt1hnrBaqTmmFOWQ2ibVWiiQgogGuM74XFodDzTm7YihFoRtex7uoWRkvcID8xBnqYVhBkIbyINZ91Y+F2lzo2bqi/36Uo2rObuzEGRuIaULIGEo6WPybIVBHdJ6j5JGqqhrDIEVc+mfLkcvGSBxjYDUN7MKD5FwJyzYPmbLzIiBmvP+A2bMkjF8anL+LjmgjjhWCKAisbzorFeNfdB X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 798cacde-e3cc-41ca-eb9e-08db3cf89fb2 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 14:57:53.3096 (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: RaIwNG2h8aJ+REKtG8+d7DGaRc2xM9NcF4ijHZ0o8nbOcWaY/+FXIKF3LVf06Zpz/L6LuN6BxEfsEZ0m1wcG1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4582 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-14_08,2023-04-14_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304140131 X-Proofpoint-GUID: SRj6rkdUkzuQ3ygcyh1RihbkVsu3M47D X-Proofpoint-ORIG-GUID: SRj6rkdUkzuQ3ygcyh1RihbkVsu3M47D X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763164334443981937?= X-GMAIL-MSGID: =?utf-8?q?1763164334443981937?= |
Series |
[1/3] maple_tree: Make maple state reusable after mas_empty_area_rev()
|
|
Commit Message
Liam R. Howlett
April 14, 2023, 2:57 p.m. UTC
The internal function of mas_awalk() was incorrectly skipping the last
entry in a node, which could potentially be NULL. This is only a
problem for the left-most node in the tree - otherwise that NULL would
not exist.
Fix mas_awalk() by using the metadata to obtain the end of the node for
the loop and the logical pivot as apposed to the raw pivot value.
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
lib/maple_tree.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index ed350aa293b2..ecf4c1c0f4b3 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -5029,10 +5029,10 @@ static inline bool mas_anode_descend(struct ma_state *mas, unsigned long size) { enum maple_type type = mte_node_type(mas->node); unsigned long pivot, min, gap = 0; - unsigned char offset; - unsigned long *gaps; - unsigned long *pivots = ma_pivots(mas_mn(mas), type); - void __rcu **slots = ma_slots(mas_mn(mas), type); + unsigned char offset, data_end; + unsigned long *gaps, *pivots; + void __rcu **slots; + struct maple_node *node; bool found = false; if (ma_is_dense(type)) { @@ -5040,13 +5040,15 @@ static inline bool mas_anode_descend(struct ma_state *mas, unsigned long size) return true; } - gaps = ma_gaps(mte_to_node(mas->node), type); + node = mas_mn(mas); + pivots = ma_pivots(node, type); + slots = ma_slots(node, type); + gaps = ma_gaps(node, type); offset = mas->offset; min = mas_safe_min(mas, pivots, offset); - for (; offset < mt_slots[type]; offset++) { - pivot = mas_safe_pivot(mas, pivots, offset, type); - if (offset && !pivot) - break; + data_end = ma_data_end(node, type, pivots, mas->max); + for (; offset <= data_end; offset++) { + pivot = mas_logical_pivot(mas, pivots, offset, type); /* Not within lower bounds */ if (mas->index > pivot)