Message ID | 20230105191517.3099082-35-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 C50FCC54EBC for <linux-mm@archiver.kernel.org>; Thu, 5 Jan 2023 19:16:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CE2688E0007; Thu, 5 Jan 2023 14:16:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C6ABC900002; Thu, 5 Jan 2023 14:16:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A20D18E0008; Thu, 5 Jan 2023 14:16:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 843E78E0006 for <linux-mm@kvack.org>; Thu, 5 Jan 2023 14:16:47 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 584F580421 for <linux-mm@kvack.org>; Thu, 5 Jan 2023 19:16:47 +0000 (UTC) X-FDA: 80321702454.07.49660B5 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf09.hostedemail.com (Postfix) with ESMTP id D0A4A140012 for <linux-mm@kvack.org>; Thu, 5 Jan 2023 19:16:43 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=Xv0oiZ6c; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Nj7YFai0; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf09.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=1672946204; 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=6hunqgoWf3+7qbnIUEV4yqvkvvDOOGXUrMH8nrK719E=; b=mjPAcP/u7yteTWHJKm3cSRnWlFyEv2BZjfiBOT96Gc4PuKMsj1+ZS7t4t3spv7sCMudayz VrNyg9OxhF65c4/XjpAerG0+j5fWv7inXxX0RypjxLVMHwB1hupqKqaZW9uASbY67Jl+eH w6HG/ynV1MDhSGqNSCH9t15I3RhYzik= ARC-Authentication-Results: i=2; imf09.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=Xv0oiZ6c; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Nj7YFai0; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf09.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=1672946204; a=rsa-sha256; cv=pass; b=gtDaqpgtxPV4UV51rNUXtIoQB7y+LScfaFrAnx4G8+92R2FqukuKIZD9e7qAcmWMofdIJl pcVC3eHPajkYEdeRHMutY6t4tZeQGQQ+5JygYlBp+Bltvi7Au/5B9rx18qccFd6AhH8U4E T1T4NxB3VZDF5HCsVjUBixwEEe+qjng= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 305IU1Y4029393; Thu, 5 Jan 2023 19:16:42 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=6hunqgoWf3+7qbnIUEV4yqvkvvDOOGXUrMH8nrK719E=; b=Xv0oiZ6cMLGkMdsfeeKb0z+lIr5ep1l6BAtNJX4r3w5XhCJvr9bLfozC7R3zfShxLKDU QxmayKYRyyUReQYudKsTDh+c7PES6nQhh8Qkw6iEMQucn1lki+LgNHpBrCqAuRsv4e07 g4n31uEbi0cG8S1Bvie8eVfJPIpSfQzV8W1oH2NCbX4t9P098+vFj3bWObSPXkgkc8D+ 87CelgY3I3U0Uf/0RKL1ECkC5S19eJgVO8I4pohqrkscYuvnmghMPVhMFGsvNj4Smno2 cdm5DsYbqJ9xlydFZNcOoKlUjTq9x/eWcbXPNRrDSClr3imhnTJfNdOWnMx5lGQOtMoT 5g== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mtc0asrnp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Jan 2023 19:16:42 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 305I1EPk033688; Thu, 5 Jan 2023 19:16:41 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3mwxkf7u5p-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Jan 2023 19:16:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mn4HoRLogHK62PI9FwH/ZEVLdYnh9wKjKK4JqQjiMLw9nQG0KU/DcaNP1Tj2d0D7of+57n1uwh/bbsN2TfbRfoyeSlqJXQsexTDgvFRa3rFdXkKUt1eeCWIPefGWFAodbm6syopRiA1u1PKIl24l5SMVKpYJvD4OclNRXDO3KTbaHFJouuAe+4eI/MZtRM5Z7Q2Bm+IWlabD1kYq9h71rYyPxrG73aq2ksuzU5lfPBC5i+YnoUjBCmYgXRj2rZmkyE7s5Y2V3q0U9JJQHN1oI66a5wOpGXhacjUyn0IQmCLa4OfqkuJrBVFrRlXKQKCxJxmTynERe+7j3W0LKzc7uA== 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=6hunqgoWf3+7qbnIUEV4yqvkvvDOOGXUrMH8nrK719E=; b=PSxBYzqjU6CtKLOtd2dXgDwiDD/ZiRU5V4vDvhuHE6Fa2scvT9YZGGnVSJ4MOckQWrXh3z3N6/8orKR1aQSKnaY+BqItxvzeuZp9HYW8c4c2+kBn2Lwpyq+KR80hEgbdiZsbenRisMlGW8L2bGsIBeEKv5I0hvVIOYlJjqU6VReyN8kxWnogfJ1Nlv3FRpo3PcYCcMJqZrRyUFLo77TiJVTicjV+aMp31OV8wMhT584DiTfGQBo3jyCRgZD1owjE8I3GlW2OkidVLwOZ5ZeMSBuUZI4v9VOC8iJXLsx7nYeSpq7+k4ToSAbaUgPM9g65/kjoBYws5KL78ahPeSSJaw== 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=6hunqgoWf3+7qbnIUEV4yqvkvvDOOGXUrMH8nrK719E=; b=Nj7YFai0sYyRzvY5JZ7JuGTy+AkuaNHQ7n5sh+Xp0nBhYN9IX1JmxToJGUxZbjLXkA1KrITiKDSUpskvkLN3KTrygqXXz82lDejHlgli+d9q8Dl9KDJgP6hP1z44fc46dnPQ6+BEL5t4aK1yvCjWXBTn64ldSAfQ260VXdniCrc= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by PH0PR10MB4791.namprd10.prod.outlook.com (2603:10b6:510:3a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Thu, 5 Jan 2023 19:16:39 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::a02:2ac8:ee3e:682]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::a02:2ac8:ee3e:682%4]) with mapi id 15.20.5944.019; Thu, 5 Jan 2023 19:16:39 +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>, Liam Howlett <liam.howlett@oracle.com> Subject: [PATCH v2 34/44] mm: Change munmap splitting order and move_vma() Thread-Topic: [PATCH v2 34/44] mm: Change munmap splitting order and move_vma() Thread-Index: AQHZITomplNj3iLyTEejKFxfL0mibg== Date: Thu, 5 Jan 2023 19:16:02 +0000 Message-ID: <20230105191517.3099082-35-Liam.Howlett@oracle.com> References: <20230105191517.3099082-1-Liam.Howlett@oracle.com> In-Reply-To: <20230105191517.3099082-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-traffictypediagnostic: SN6PR10MB3022:EE_|PH0PR10MB4791:EE_ x-ms-office365-filtering-correlation-id: 1e31cfa3-eaae-4dd1-d848-08daef515eee x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ANnfsmW1KXWJieY3o6UU+VkhVxiaIqxpcOTzGX6SrIXSBsloNppW4CAkCj3Cz06I1thSvzKHYXdjlgJyUNXu0CQa2WSacsns7tAvPj8qKlCnx/96g3yEMU+ePnH2tnj9KKXUBvYLuZKgr8j3HNYUmc+XZH788C94gHHSNsbS7zOhMDtoUNISlvHKGrAl+ZFpuH6TFaSKXtxu+ZROeeJeS3XwpWVPx0A77mULtP+x92yQQSW1AXn7ylXosEVWSKKX9ov8DLDQRlnLU3CYsSTn4E8Bg1v9Xg0rOGAi2c6JehmRmB4GnGSkcWtRfqEa26tXzarL5rX/53Nc1hCRfdUmBS2hmCLx+7P6Usdpw0DXmfQipQBtGmIDHR1Nh+utsKIIk0JPSbpiOV2cV0MvLnMhDLZGC6WyQCcaWre9zwEBy9wfDoKru2rAHnLjklNJl8wgNX2dcff5UBaLFHoqCDBV2NLCUDyr7uQM7oq57DEAEuMf6GehWzoQmHL41waUI1YOA3cGlprt3TYS/ewQc2N1/fR/VXfpGdyaIIC8GPx4UdydUMHOWk7Klv9sO3lUkZXO6zzVhTAuaQi3hUhEBAH5uFJdv2ds99H+z8vRfj47PwZHG/UPotC8WHqq2uxaubr30TZ6BUsPQyi89mN/D0zNfwi8vkft2/eNGSMoO9O1KHNb4QeWVmI5+sKTR+8lAT3MIVrW5yjN/GPsG4Idt0ZdbQ== 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:(13230022)(376002)(39860400002)(136003)(346002)(396003)(366004)(451199015)(83380400001)(8936002)(5660300002)(38070700005)(44832011)(38100700002)(36756003)(122000001)(478600001)(107886003)(6666004)(6486002)(2906002)(54906003)(110136005)(6512007)(186003)(26005)(71200400001)(66476007)(64756008)(8676002)(4326008)(66946007)(66556008)(6506007)(91956017)(76116006)(2616005)(41300700001)(66446008)(316002)(86362001)(1076003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?mvFtErP5Na8f+EOJ1wdvtzA?= =?iso-8859-1?q?kxbaGdz+c0AmlwmM30c+pMHuXgwA5+3nmdckBS6RN0tm+VvhirKq+YTbqNc2?= =?iso-8859-1?q?V3nXXkntr+1uWD1LLCEqFgJfBqUpkw55EekpRQwQ9J8eBZiCIE4hz9yjyPhL?= =?iso-8859-1?q?2bRf4vbJFil/faISn8yzoVgWbGOCrm8pVjJSc6MCFYPi4tTq7bSRMday7e2+?= =?iso-8859-1?q?Cr5iIiIL7AxA4rwh58/0Dvn56iMu72A4i5VCXk5Rd/zS+r+R4QTnZ9lUOYJv?= =?iso-8859-1?q?khJ/WTrMpt7d/qzdX0bCRohSIGuWpHvR6NdgQ7+Rq4GokAhOhlSHLB5xbigX?= =?iso-8859-1?q?UNlrQDJ7brITOeSCMZiLAypjt4c3zdUj6UgTOAKvf8ta5Usng1vkvcWLaHk2?= =?iso-8859-1?q?UA4WQ0NrCoCclrkFqaY5TYutY4tI9jURTyr6mWDRg2SNNp9fozRqdbaxDL8k?= =?iso-8859-1?q?To2nnFWXQR51TusRktywgtCtVBNe1lL7KXXJt42uIVKZAWyxMKQLl7VekQ3Y?= =?iso-8859-1?q?DkLr/qXkKRLDn8ZxLyg2B4qc2pUlx3c4Mk93JLCpaCUXacq/10JCqbTpmXMf?= =?iso-8859-1?q?peae98zZ6XnusvwOide9e+5A2IVB5Kw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eqG49r9A9qNeVIx?= =?iso-8859-1?q?IFRqQaAbt4xtQQZWOeIBbHhbpnzuw9BRFQgDiWql7TxBpx40q23ixX+dQwem?= =?iso-8859-1?q?uJtOvovxsBvBXogHB9s8ZGX30zNZXlOeaLsSwv1liBbToEdjr7NoGwokJzbc?= =?iso-8859-1?q?YrB19VMLEAu0mD0jklUqRVD3DiKfPg/NkRr0k6g=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: ehBDhUStFMIDs1zTZHkMuP1nQStL4ELr/e9N3n5vsJMltvMrWFA+n7p+fpLyIhuGMlkEWrslKCmQ020GAoNGl2Y7ADyLyAIB/BswHuLMiubFk8e/pVu4FwWItFiQ7oqay/HmyOcifolnT31JRYizBuTrou8PBLovuZkvv1MwgUjLVFnSwcHw3UiiDsD5Lt+Ew01pXVQwPib31r1xhalbl06+H28JCWfmYNoqDWu0rDVQ5MZnNuhyOpREFV/BFiZ7AseFYo/l+nfm7NvccmBTIrJ0ujrvbCG4mOrp/QrTgFMqHi1ZMe3Kw5Og2g+dXCPmCGaEUltlZy0VXkzpG5U6zbPE2zYzOMKAIHxA8URonLkrk4jCpjOOrCHrQ+3GepbmhasR0KJpWwWsnDt+Ju4vMLR9JkdHNMUZSDmD98vdMN6Fk5pehXNT2oeQ70o1xItm4T0mCaX0ZiBX0hTHZgdcMCQEfUFkXuZ1AQyMveFEpyVHufW9PV2GbSYrVfXIvXsedLR3rmQ9K8nu7Rbm1QDedncd7Uzevaz3EiXV7WrgyWe8DdM5FYJDmjCiBkS/4Gn3iwTaAS4WLuRjpOJSYeJHWWuDYR1QvBbZi7Vtn/JJdzyoLvcdDq7HcgX9bj7S0JpqmRMOxuPhOvBLtMT59wQswlKaxplQWpaFXIeMEJklGX3m54ClxEQKR+PvTbRrXqUzKIpNXpcdqDE3ynYpDTk/9S1zoEyguaNTX035XkB20ImyfLgSxZyE94ITmerA6Bw++T9ay/bk15Z6683X86Bcxu5RSZdwVom+YUX1nrSPPWfJ9kzN/1xFuwuKmztT0ZoaK/wqDvuhMCfRFu5g0kxwfiIpW2u9Kh5CZ03GoK8rSHyrbC9xdunZ90F+abonFM8OoYhCNXC4Rpv9wL/33fHtIg== 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: 1e31cfa3-eaae-4dd1-d848-08daef515eee X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jan 2023 19:16:02.9846 (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: lRBXJg56Aa+f/giUwqUwNXtF5OjUBPObQWKMhQoCoxQpAA8rQvIjAu2DJqUv8fbg1TKk34/ZvBgJteQ0DvxTWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4791 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-05_10,2023-01-05_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301050152 X-Proofpoint-GUID: rBfeTAkRHqV57rChOTjXUv4jWFR-D5WI X-Proofpoint-ORIG-GUID: rBfeTAkRHqV57rChOTjXUv4jWFR-D5WI X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: D0A4A140012 X-Rspam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Iyk/fCot1almTpqq6FDEnmgo/j44OxuCO3ixrRmOzQWcBPIvNLNk6jwo2gxwYKDXhZLMmHtawZSNuYRxyEYoUOiBq7p6diLK//rxiVsyQFm+xjO3C4/pxK8mxVw== 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 |
VMA tree type safety and remove __vma_adjust()
|
expand
|
diff --git a/mm/mmap.c b/mm/mmap.c index 99c94d49640b..c1796f9261e4 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2387,21 +2387,9 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, for_each_vma_range(*vmi, next, end) { /* Does it split the end? */ if (next->vm_end > end) { - struct vm_area_struct *split; - - error = __split_vma(vmi, next, end, 1); + error = __split_vma(vmi, next, end, 0); if (error) goto end_split_failed; - - split = vma_prev(vmi); - error = munmap_sidetree(split, &mas_detach); - if (error) - goto munmap_sidetree_failed; - - count++; - if (vma == next) - vma = split; - break; } error = munmap_sidetree(next, &mas_detach); if (error) @@ -2414,9 +2402,7 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, #endif } - if (!next) - next = vma_next(vmi); - + next = vma_next(vmi); if (unlikely(uf)) { /* * If userfaultfd_unmap_prep returns an error the vmas diff --git a/mm/mremap.c b/mm/mremap.c index 00845aec5441..98f27d466265 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -580,11 +580,12 @@ static unsigned long move_vma(struct vm_area_struct *vma, unsigned long vm_flags = vma->vm_flags; unsigned long new_pgoff; unsigned long moved_len; - unsigned long excess = 0; + unsigned long account_start = 0; + unsigned long account_end = 0; unsigned long hiwater_vm; - int split = 0; int err = 0; bool need_rmap_locks; + VMA_ITERATOR(vmi, mm, old_addr); /* * We'd prefer to avoid failure later on in do_munmap: @@ -662,10 +663,10 @@ static unsigned long move_vma(struct vm_area_struct *vma, /* Conceal VM_ACCOUNT so old reservation is not undone */ if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNMAP)) { vma->vm_flags &= ~VM_ACCOUNT; - excess = vma->vm_end - vma->vm_start - old_len; - if (old_addr > vma->vm_start && - old_addr + old_len < vma->vm_end) - split = 1; + if (vma->vm_start < old_addr) + account_start = vma->vm_start; + if (vma->vm_end > old_addr + old_len) + account_end = vma->vm_end; } /* @@ -700,11 +701,11 @@ static unsigned long move_vma(struct vm_area_struct *vma, return new_addr; } - if (do_munmap(mm, old_addr, old_len, uf_unmap) < 0) { + if (do_vmi_munmap(&vmi, mm, old_addr, old_len, uf_unmap, false) < 0) { /* OOM: unable to split vma, just get accounts right */ if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNMAP)) vm_acct_memory(old_len >> PAGE_SHIFT); - excess = 0; + account_start = account_end = 0; } if (vm_flags & VM_LOCKED) { @@ -715,10 +716,14 @@ static unsigned long move_vma(struct vm_area_struct *vma, mm->hiwater_vm = hiwater_vm; /* Restore VM_ACCOUNT if one or two pieces of vma left */ - if (excess) { + if (account_start) { + vma = vma_prev(&vmi); + vma->vm_flags |= VM_ACCOUNT; + } + + if (account_end) { + vma = vma_next(&vmi); vma->vm_flags |= VM_ACCOUNT; - if (split) - find_vma(mm, vma->vm_end)->vm_flags |= VM_ACCOUNT; } return new_addr;