Message ID | 20220822150128.1562046-43-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 BA36BC32774 for <linux-mm@archiver.kernel.org>; Mon, 22 Aug 2022 15:08:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 604F48D0008; Mon, 22 Aug 2022 11:08:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 58D238D0003; Mon, 22 Aug 2022 11:08:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3DF778D0008; Mon, 22 Aug 2022 11:08:09 -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 2E40F8D0003 for <linux-mm@kvack.org>; Mon, 22 Aug 2022 11:08:09 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 920A6A013D for <linux-mm@kvack.org>; Mon, 22 Aug 2022 15:08:08 +0000 (UTC) X-FDA: 79827559056.27.D35FBAE Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf04.hostedemail.com (Postfix) with ESMTP id 2BE6540099 for <linux-mm@kvack.org>; Mon, 22 Aug 2022 15:06:33 +0000 (UTC) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27MEirdd017906; Mon, 22 Aug 2022 15:06:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=yaUVIE13JYT44Xhcs+e2pViQLrRAEe0x173o7thAU/4=; b=J5EvqTKDjWmvYGEKjI/xMzCYT/imO6QHPD5zmGEZcnOfJp+256/FFSw9jcQF1gIzmO6a k1bAJ39dJyCLuu9ZcbORhg0dnfKEd/TJ76WEBUEanyMA0EHGNQI3/RWxFRK8YAhEBZ3E JmTz7JuXxpCmV1/M4qjQ5t3JpZtdTifHWrHNVSqO2sEkKuiS93pcBqsu2fhAQHsEnGxw t5FGRSVxJMqNhsbtFwVCtVIW4GXz8JZwZIr0PqrkrxjW2jOsHV152Dbv9uSl8Zkvjc4q To+16fLmtUlPApWijhRSSEphQIvCgWuCtmof10dS7gvZaEZD16OBqCmaL4vqBQ+bSKC1 CQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3j4bkt049t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Aug 2022 15:06:33 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 27ME4Na5026712; Mon, 22 Aug 2022 15:06:32 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2043.outbound.protection.outlook.com [104.47.51.43]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3j3mm8bef2-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Aug 2022 15:06:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TN3j7PR4PDya3+aQkjzwuhd29EtKRnFsJqcjZsyzjJNeFw5qaNKzojZofk6VlGuGu6GogCIqmJOp0t23YkpCLuBsrPMmUBXwIFhQJx4K7yqMjnCAxhietkmzF7eQpK5sXcKunuL3YU6ZXKzZfhW+s/DIAdHdLMIABF/h0WfacmDxCssW5n3M3eKqUGZ5bmCrN5DQHHN8qloKIvHMXLOT9CbMaKLgIbdPJO4lFjdbxKcrL+KOZ+bS0HwEX//yi2DDFDqyjGI3Ipytzyg/ZM2EvG8hwWG05/lnB3oVG52Zo0wqWAmErdftkZM7SXsYnLOJPMlk7n/lpqbsv6Ep/wnpKg== 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=yaUVIE13JYT44Xhcs+e2pViQLrRAEe0x173o7thAU/4=; b=KkWD1OEhA2zEBwNDInfAE0amE8OPxMzUYJkehqtaB7AsyCdy49iKmU847+tRBPJoiOfUQulPZvE//xPb10fg0fZ6H0nzB1HBZt7vPQLYQaXxVbpCiF9GOrjO8LTuHy/2m3kKFVOu4M0K4sDqnUu5ZnMv10SkSZ/7eJ8V8Y84hWBtCuAjCQLcz6eVzQQDviH1Nj9I2gyF5uKyu09kYajdbIEGORfEwiRZ2ZScSCTTDwFI4DcpH6BfbxQhXT6DxqokR+y725TrSNEp7uVPszC+pyg75dNepWVlG+MwC6i1Rrbpd4FvGEv8iE4KBZCpGPja9SYkAYLjM9i6THkzR6FqSA== 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=yaUVIE13JYT44Xhcs+e2pViQLrRAEe0x173o7thAU/4=; b=gOxi1iSgv2+K04Y27XKx10Fc3tc/vhoriZ7SJoQwnuaEVCWQKH2WTu40A+x+vXSGplmVCHXgkAynOMPYo97NJ+7J3CXL5M9HYrmjNm4vRoUyA4Gr4lHet255iX54lyErt+HoiQI59F8H6/5NWrK1otGNt1S+aLYG0xYfHS7uVdc= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SJ1PR10MB5931.namprd10.prod.outlook.com (2603:10b6:a03:48a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.19; Mon, 22 Aug 2022 15:06:26 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::3d34:ebb5:d9df:98b3]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::3d34:ebb5:d9df:98b3%5]) with mapi id 15.20.5546.023; Mon, 22 Aug 2022 15:06:26 +0000 From: Liam Howlett <liam.howlett@oracle.com> To: "maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@linux-foundation.org> CC: Liam Howlett <liam.howlett@oracle.com> Subject: [PATCH v13 42/70] fs/proc/base: use maple tree iterators in place of linked list Thread-Topic: [PATCH v13 42/70] fs/proc/base: use maple tree iterators in place of linked list Thread-Index: AQHYtji/MaQfHUxa4Ea/rqE8CDo+LA== Date: Mon, 22 Aug 2022 15:06:25 +0000 Message-ID: <20220822150128.1562046-43-Liam.Howlett@oracle.com> References: <20220822150128.1562046-1-Liam.Howlett@oracle.com> In-Reply-To: <20220822150128.1562046-1-Liam.Howlett@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.35.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bb74edaa-331d-4855-f600-08da844fe2c6 x-ms-traffictypediagnostic: SJ1PR10MB5931:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: s3Ei1kskKGSx73+UBVMoYWetD2lKX0oZBgjcBkuk0ruIl4Q3m8e/mHoZFYRVinfDccelSiot1Jw9kwELqHncSbUg81uKh/FMhHcJ4UEjS8ESTf2M8WWGs91NlMTrKiqOEDuBgMc0DV9mDEq58WIK+5GA/mW9JjXx63X3j+oe2p2F3ARIHygKr4bPDmol7gezIsGtwNOOwtoKtLtgYwlUw/fb20MoksnZGuI/IDBsL6xBRb500wmnsrSNR1zDX5lkuToth+qCa3kb/SsxIvqaaZGKCuU1lFZSlVWmcphmQ5WFqjUx8ibkdhbEw93oGWWbGoXfQgdE53+Mbj3VVcu9xGDTX9/l7SdkIdW+sTwkcR+Wsf0eMBU2qybBBQmGPDwkeMVyTlLsEFDNRRi96cw4gAeLI2ur5D9QcmK0MzL3G4wxLYdf3GHvbwYWe/1b1jjO67B7pyCJOYUX4qw9yiOoOtHJAVpICY1PlM5/rxr4yRHtYhPR56MPCfjZhcroPC7Q5YxjcltHoQb48gQE+YZhzQ79BGncIQGOOxtk6c44//ewh4Lv3Z6zxwYTCzxdstBJ48GjsPQEPuGQ6j2XL8Jfa2OnpbER+HGR1kKSXqmWqlnZfwo80hhsmb1KbfcBSqQ9fMiKpT1Zi4t3pMGI07pMTUPeolEuK0l8G1OsdDF39LZtBpY99bNlXA1JPXOwMHSxMjPDanT+yjnfgJDNv0VDwQkMAeaYFw2nIEsieMnWA5L5QOQpsi594FLBjdLOxZi9JLXutdFXkX2kZWhtlTvavg== 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:(13230016)(376002)(396003)(366004)(39860400002)(136003)(346002)(110136005)(83380400001)(6506007)(6512007)(36756003)(6486002)(26005)(5660300002)(478600001)(41300700001)(107886003)(1076003)(186003)(66946007)(66556008)(66446008)(4744005)(44832011)(4326008)(64756008)(86362001)(2906002)(8676002)(71200400001)(66476007)(38070700005)(2616005)(76116006)(122000001)(316002)(8936002)(91956017)(38100700002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?BEydqXUESKHVAh8X5rp4gWm?= =?iso-8859-1?q?ccLwHZc9Ns64NGHl262Df7YPSEiUJw+EeCuiB0puM4yDfCAtnrZMWNJc5hxa?= =?iso-8859-1?q?CKSdIfSd+KPzdPA3489ynX34R1WbF/tpCeTiIPAQYsmSu4l6dXqVsTgE5WEV?= =?iso-8859-1?q?fP9nWhp1BP+Quwy3PwjSVmYfRaAlXWjV8ZtOwa/9LkNTEasZA7PZCLOTtPn7?= =?iso-8859-1?q?x69fcnXXAYkQuUezNf4iUOPnLkiws6MuXu7bAQhZHCQSFPcCjX/EFegsNLAi?= =?iso-8859-1?q?4wWnh4DJHymgWleWwMbKVuLDhl6elqtaJAOs7H+u7l43q9TH+JVEK6Nn/8jr?= =?iso-8859-1?q?V17dWmMQBkM7NDzFlZaXapZPIpsvRgegwlz/yXlipDSlSkJemgyVXj6URo4M?= =?iso-8859-1?q?K8A2Rtsqw3/oqHUFTyX9L7O2f5Lek2shrbm3bH8NKaLeltYw3ODPrA/zz5Mp?= =?iso-8859-1?q?ERfwx0MbU1YA2NI6RZTYZCxXEZvgzmmLyKZOVQRlDyPjvj8X6Opzmln0qVCX?= =?iso-8859-1?q?FjjY4r+aNsPIF3X44njSuMisx/UbrdwLAsAlvZlP2OHaco/P4KBPTZkO4sPC?= =?iso-8859-1?q?9lPzcg8I7wPntv5/SITz9BEXfTljRiBoGbn6CFiXyEEbIN+RI96dEi1RH8R+?= =?iso-8859-1?q?OZlvn1D6Qi2s9rVlPPU0B31S59rhDuhTc4KYaLxOdzvsG92wFftfHg01B4e1?= =?iso-8859-1?q?v6ExYocrpyB+gIAkHOY8YrN4KDmUslio9ELtiIKD/tTx3CGcGpUSQPDc8o/R?= =?iso-8859-1?q?CFXBuy4cNErAyXC8uYbtll2gudcRJZWBuFzuVmiq9PirDnG3/OHNRD3eiB8z?= =?iso-8859-1?q?Bm381W9H7dOCVTDhO0qk0LTTuLL+eIpPg5Zz1AG4RtP/9N1xqZ4KOECi4RLC?= =?iso-8859-1?q?cdsuj8YZwQKHqinXiVWjHhKP3VtBOaTJcWj84v+Ob3/BbDbPtWZ1xGZpQ0so?= =?iso-8859-1?q?cJloX3+LLx1TeO1Tarmdfb9aMiLw1EOGVux8ZN6T3EoroqZLVk8kueVbJQD1?= =?iso-8859-1?q?anx3TACwmEZdhm6UfEnfq7U0hnM24Dp9SxAeHcJhXvan7bhMrE+bCmnqTT6/?= =?iso-8859-1?q?OI5Y4QjGpdYhrTjMtYeaL8FxhPGmPyBzHjnw5NvPZ0kLNOoDpQ31IRY98fC2?= =?iso-8859-1?q?Ord8vqmV7gLmgcmOK6XrO628U/JbyxjZAQXJpxys/1e4jggom/0IKlBk6emT?= =?iso-8859-1?q?/rCzQUYfP7Dtgq5oLjG6Jsc1uIRuisZiA5Fn95F9H4qj3BGZtASgGjf/zRwj?= =?iso-8859-1?q?7PpDSL8MhwLv0IyVnZ/Rvyafi08EV9toG5+Yd8ReaRsN/j7md0FpEJb8fXFp?= =?iso-8859-1?q?9zTofwzc3fem3123AHZVAE1nMZd3JddMfiL2Fbaq14krcfdKb0Iao3OVRCAJ?= =?iso-8859-1?q?MTe9KY9p3ui5byWlz5qDaWYgR/N401QmBWlseCAlDeN1aj1dTTMPM3bJ7BWv?= =?iso-8859-1?q?FlrB8hjyA+v2hP7WIOR7d8OKzzVjtiiVHG4/hYESAfnD6YNOFIya6Cw70Lte?= =?iso-8859-1?q?3rS9YiyCVQQ+O+dLzV6WXBhQi/2nVs1JZ9KH5aX256rzCht3MuPPZMlnusmO?= =?iso-8859-1?q?+5euBqbBTZ5RiZKkbHbB9ZUY0ilzO2Jq1JS2MZNTVoyPiuDBCOT03udMlaV8?= =?iso-8859-1?q?0kEQ8GknTUBlepbco6JLlOpwEs1SOhJw63upL0w=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb74edaa-331d-4855-f600-08da844fe2c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Aug 2022 15:06:25.7538 (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: lry7OWwNtRT/jtGLvVT0Z4LFIfPBEzOLWOrE/aDeZzPLodxXiX575wpppIiOM+t+IHmqmGPG3UqPaqjTJd6b9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR10MB5931 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-22_09,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208220065 X-Proofpoint-ORIG-GUID: jViO2sJzd7GgClUUS6DVtJY781MTrS0q X-Proofpoint-GUID: jViO2sJzd7GgClUUS6DVtJY781MTrS0q ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661180794; 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=yaUVIE13JYT44Xhcs+e2pViQLrRAEe0x173o7thAU/4=; b=fAfiDPhWM9g8Wf9j2AvAVpaJ2Jt8nkKQmeBd4mQWFpxExHtGAic7l5GWyzYoOP9WfEQ8DN hmwvTXV7tHbTRZ3pns5jz5ZnbGA40swBXN1u9xRpBFT0cCMhrUpsIKuyhPSZ3TLJuZiWTy YcuOqjFcM08tWOAOFIQA2dkrE40EM0c= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=J5EvqTKD; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gOxi1iSg; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.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=1661180794; a=rsa-sha256; cv=pass; b=Caspel62NH1KwbIUkbwV5KdlezaM0AAuBmvvfCK8+PinnucDtkx9DT4WOCsM8NOWF8zSHj 3yhjRg/jA4M2hLcPXSFiOABvrQkMcEdoTilBeIjzrzhhMn8QJ44sfex98v+mdgDu9D5aHG msucExN28ahj6DeX/xhhzgay5XMKpQA= X-Stat-Signature: 9hexs8srnft18k6k1kqgrnmhmpt6oi4f Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=J5EvqTKD; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gOxi1iSg; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 2BE6540099 X-Rspam-User: X-HE-Tag: 1661180793-768836 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 |
Introducing the Maple Tree
|
expand
|
On Mon, 22 Aug 2022, Liam Howlett wrote: >From: "Liam R. Howlett" <Liam.Howlett@Oracle.com> -ENOCHANGELOG. > >Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com> >--- > fs/proc/base.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/fs/proc/base.c b/fs/proc/base.c >index 93f7e3d971e4..0b72a6d8aac3 100644 >--- a/fs/proc/base.c >+++ b/fs/proc/base.c >@@ -2350,6 +2350,7 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) > GENRADIX(struct map_files_info) fa; > struct map_files_info *p; > int ret; >+ MA_STATE(mas, NULL, 0, 0); > > genradix_init(&fa); > >@@ -2377,6 +2378,7 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) > } > > nr_files = 0; >+ mas.tree = &mm->mm_mt; > > /* > * We need two passes here: >@@ -2388,7 +2390,8 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) > * routine might require mmap_lock taken in might_fault(). > */ > >- for (vma = mm->mmap, pos = 2; vma; vma = vma->vm_next) { >+ pos = 2; >+ mas_for_each(&mas, vma, ULONG_MAX) { > if (!vma->vm_file) > continue; > if (++pos <= ctx->pos) > >-- >2.35.1 >
diff --git a/fs/proc/base.c b/fs/proc/base.c index 93f7e3d971e4..0b72a6d8aac3 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2350,6 +2350,7 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) GENRADIX(struct map_files_info) fa; struct map_files_info *p; int ret; + MA_STATE(mas, NULL, 0, 0); genradix_init(&fa); @@ -2377,6 +2378,7 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) } nr_files = 0; + mas.tree = &mm->mm_mt; /* * We need two passes here: @@ -2388,7 +2390,8 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) * routine might require mmap_lock taken in might_fault(). */ - for (vma = mm->mmap, pos = 2; vma; vma = vma->vm_next) { + pos = 2; + mas_for_each(&mas, vma, ULONG_MAX) { if (!vma->vm_file) continue; if (++pos <= ctx->pos)