From patchwork Tue Jan 24 20:34:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 13114785 Return-Path: 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 DA614C54EED for ; Tue, 24 Jan 2023 20:34:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 550DE6B0080; Tue, 24 Jan 2023 15:34:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B93D6B0085; Tue, 24 Jan 2023 15:34:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 157056B0081; Tue, 24 Jan 2023 15:34:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 012366B0082 for ; Tue, 24 Jan 2023 15:34:51 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C28E640714 for ; Tue, 24 Jan 2023 20:34:51 +0000 (UTC) X-FDA: 80390846382.07.D762B25 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2056.outbound.protection.outlook.com [40.107.100.56]) by imf28.hostedemail.com (Postfix) with ESMTP id 1F4DAC0003 for ; Tue, 24 Jan 2023 20:34:48 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=pQRgju8p; spf=pass (imf28.hostedemail.com: domain of jgg@nvidia.com designates 40.107.100.56 as permitted sender) smtp.mailfrom=jgg@nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=nvidia.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674592489; 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=Hqh32U3L0qcQ6RDnBFAgQsDim+Ys7n/Vd5L4Vngc468=; b=KLoAi7s4O1+vvILddAHFivPFigb2ShhOi4FMklX3FfyqX3Ol37xTknhDuO86HjF9Xo8z5J IkY4PZEghT2vWFN+hdh5/b/cCL+Eoz5DNRi/Nc0mPyOe9TssTep8W5q10+L8AuP/6GREgV JX8/2SYI69Vz0f42AzOyUkoKaLVHp2U= ARC-Authentication-Results: i=2; imf28.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=pQRgju8p; spf=pass (imf28.hostedemail.com: domain of jgg@nvidia.com designates 40.107.100.56 as permitted sender) smtp.mailfrom=jgg@nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=nvidia.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1674592489; a=rsa-sha256; cv=pass; b=Z/rL9Phw+XgdgvcvUUKabjgwGCAzq8zeYfhAUcKwVX8rFvCi1B5noN1P9/Y2Sjyw99m0R/ PEFFLCcCHjq1PKAD48O/akUqVLcV5M2nwd3s4+KNL4pG1ILO3QGweySp2emuCrNcLMsHNW 8jdmf1GE0+ka5lIVpL+K3gt5Wki/wYw= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YVyfG555qPlvnHeJETScOWckp4wPVvAjE33CFv0ujzleX7/HxC8emxMvIII0rtZNfHg1CI7Pub340y5EOnwVKMTAlWHngOT2P9A30YkDa7tZcYtzHqeCza3baixMwvOUVM9XybgpHuFjZzYvsFrzbuA73Z+CoTW28WsQEE/FBXVO0y8dLHP0K55FXhXGJwizSzwlEGjFXn6tH7c4gP9puwXr9sPSHu+vo/n3ALeVauzdhRqiiD8F6Rm5OQL6hDHKk32T6mg+POXZLs6hWv73Ax3jVddGP5Phe3MJo03bDhSG9dQuc01bla1XFP1k5hd3ZZveT9HgveZA5vj782NcjA== 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=Hqh32U3L0qcQ6RDnBFAgQsDim+Ys7n/Vd5L4Vngc468=; b=aHyMdnmVjr98pYkSnI2IhlwXEhhjRLLqExQXP9F8CYruVDD7NIhdpqPiGsYq3wn2R4luxWbgcFkyuBgcSNyBY7UCrh4dIBsxQVaGLetl46HPszp56ZpLqmqiTMzKXozHRGkB+WoA4N42k/PfZN5oh5NY5iv5Iuq04U0BUlhvr2n9qXSmphaJv6AQWqDX7F9RsuqSInNiD4igX59booQ1yqhdjTfbzH2nL9Y3TcUekzIwfjtpPbhTqvezvgKOjrQMhfBbb55jc+8Blzu5A68gFT2au8n3nk2yTnXbJkpy9aq8ciUY0oLckUYrYb0E9MhDm/QGamFltniN/lEZqhfufw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hqh32U3L0qcQ6RDnBFAgQsDim+Ys7n/Vd5L4Vngc468=; b=pQRgju8pNVS+dnpQsCbMBM3EFATGMwdhnz/lt6dYOYJBPu47y42Zeq3RZFfPk4txtLkX22a2WwVzu9uAgfsaks2D/vqlfd0FUmEUs1/CT/0pPTw1eRETdlRCOHUX2uqbuJzBLA2jgR6RkDCS1S7RRT/gs1+XwLI3loDv9/F29gCq6BO4TJzdodIvNcYw3IVyhWIlhnk2Hdzq0hV4Mt0aW1WvdHtFlz/6jyOQgSIHxNVTa+3uB5i2Ao9yRJN+7qP3FoSB7A375qaTrxCoOXmdFHONxGTCFZLOomkatWEim6YBSGSBN+EF8Glmf3T4EVaCKpEVkau1MaelQeJ31ZluYg== Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by MN2PR12MB4095.namprd12.prod.outlook.com (2603:10b6:208:1d1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan 2023 20:34:38 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::3cb3:2fce:5c8f:82ee]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::3cb3:2fce:5c8f:82ee%4]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 20:34:38 +0000 From: Jason Gunthorpe To: Cc: Alistair Popple , David Hildenbrand , David Howells , Christoph Hellwig , John Hubbard , linux-mm@kvack.org, "Mike Rapoport (IBM)" Subject: [PATCH v2 07/13] mm/gup: remove locked being NULL from faultin_vma_page_range() Date: Tue, 24 Jan 2023 16:34:28 -0400 Message-Id: <7-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com> In-Reply-To: <0-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com> References: X-ClientProxiedBy: BL0PR02CA0081.namprd02.prod.outlook.com (2603:10b6:208:51::22) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|MN2PR12MB4095:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f8a1292-e568-4413-81d7-08dafe4a688c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Cj08k9LkhP11QtOv96Zl/f5Hs9Um7LqfY3M9EtcS94/4lM06XoI4riLWq0oS4D4j+niC4FdTVJZmDPouJc8QD1z6mIPTtoFuLe9y3rdsfSUrUMYODHdLg2HZyrEJLxsuR6s6q3kWQEKC8fPnIhzMks/oTVWBP9Mjys3wQf0NV3YWR3ygQw1aDg8Xs/YpA2BP8u50yneX31SLG+TxAveZZwtNsZgXXGSlzC7pWrwKqGcVXPTZSQa+sbYpgyzuumiCui9irIy9sR2MoMyM8npedYa6njVkOAlFnBqKCT+mbDwuUCDdj2nqlI4qPcYBRbdDA6lAJOfabikKOswKvGAiaxPU7EzsPVmO9HoeT9N0grZ7bRIO84cynwu2X2kDaSQYoMGVxLykbd+544rHfN4kqeJrDVh/UTtZ2K5xtUt3HLwVmU7eceC8sT8HgIKoULQ8ytWLJMHHEbn5ZEnd6oldF21CBizRrA5BXuRmALqZ6bHpssR3fFCbZwOcrbyWHNCS38U6dg2FQbNzzW2RGIrbcAA+Zko13tIJpDHsL511d9BtMKFPYxL+B6+8iSs2aq5eWUmK5Xb9jWecjYpgXut6aqgMVEIMUBRTe9q/UgjT1pXnaGKUu4tVQE3JKFSnQeoCAHqkcMr58M9kahAsJeqHWadBgxx6U5b5iR33KqbKZqdeVoZeAWjmOJgxmrC/YzIBEtgfsQp/xbAUW46/4GoyPg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(451199018)(109986016)(38100700002)(83380400001)(5660300002)(41300700001)(86362001)(4744005)(2906002)(26005)(4326008)(8936002)(316002)(6666004)(6512007)(6506007)(8676002)(186003)(66476007)(66556008)(54906003)(2616005)(478600001)(6486002)(36756003)(66946007)(4216001)(266003);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mzv8UDy49NXh+h36ks1AsJ2cgEd06Hq5xqlJZP8Dh0VGkV12gaZjlw8sBqyifL+X5XBGUYxZqt92s25oRJhUDc5B6qwXNFTeqHHvGe+OQktKJP7IuUnUyHjInMP/qNdD7zu1JNV9sLnepcZ7V4jnmsfXUiwpJXRD4fpasjpc+D40cRxgtsky4MOPDmhcb+eh4dMFGWmh0ZnzkyZGDr9Cu16QHetL5qbVo648I1F2/3KGChNz9Kh3bsufjdOluO2eTesQe17pwze/2mTgL2yZMTSxS0mCRWgmPNLkY4cC8Vh0BWsI5S0UEPbCdzF406mO2WilBs3ljlDda8rRLVLnJET8FfrhZymJJYy2smtIXK2J6wQst5esE6r6ZLRdq0Bo2MjYGPK1Weqb3yR5XU6TqZD5L6AYXBPZhuFHS1irpzVQLfQgbAd+R4oZPw5/jHHI+fglG9LY765yRDgixEdAhnyJZ09ZZGTPyQDClgnqLVZTTOodugV+3MqqRt6L9NmvyBCDS07qcGjsbPf6js2yzPMDXNSru3JoFmCaY5Vr5FBaLSAPw8q8+Q7EnyKuEkFy+0xPLumFbDUuuS7Rnw95HYX1f5fV7 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f8a1292-e568-4413-81d7-08dafe4a688c X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 20:34:36.2512 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VIOiV/vhUDt3xOAP/AchK30ms/PkFeWaRLf8Ao3PaRON9MWHqdU+EU1g3l/p0cU4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4095 X-Rspam-User: X-Rspamd-Server: rsp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LDxWfmaXPRTe6KzjIXj9mA06R+XwANA/Nnoi+3DnbImtJjcXTHdUN6SVb42CJjYVvd/iZGEpUnq5bHZpL1O/bFpXgyx1iHLCo5xUFN71DRg1KbMvh/bATLaA0/6QHKCWjfT+G0V4yzj5kNkMtKmIXkL+1mtXdYxsZCRt2WyPH3sjWL6whybLKy9TTWhLhddCkE7+wTAGqadr+MBpOTpz2O3j+U5Z1Jsj8xNSA7K25WgzHwU0vl0GcFsMlCDl46EdgxXk6LG0qm/1/wWF8ofEQwOdgLOQQ+ 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: The only caller of this function always passes in a non-NULL locked, so just remove this obsolete comment. Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard --- mm/gup.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index de1a5c64fdfdcf..dfb315b3f2950d 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1558,12 +1558,7 @@ long populate_vma_page_range(struct vm_area_struct *vma, * code on error (see __get_user_pages()). * * vma->vm_mm->mmap_lock must be held. The range must be page-aligned and - * covered by the VMA. - * - * If @locked is NULL, it may be held for read or write and will be unperturbed. - * - * If @locked is non-NULL, it must held for read only and may be released. If - * it's released, *@locked will be set to 0. + * covered by the VMA. If it's released, *@locked will be set to 0. */ long faultin_vma_page_range(struct vm_area_struct *vma, unsigned long start, unsigned long end, bool write, int *locked)