From mboxrd@z Thu Jan 1 00:00:00 1970 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 02BD4C433F5 for ; Thu, 3 Feb 2022 13:31:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 913ED8D014B; Thu, 3 Feb 2022 08:31:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C3A28D0124; Thu, 3 Feb 2022 08:31:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 764D58D014B; Thu, 3 Feb 2022 08:31:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id 662298D0124 for ; Thu, 3 Feb 2022 08:31:34 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2658888491 for ; Thu, 3 Feb 2022 13:31:34 +0000 (UTC) X-FDA: 79101555708.20.64355B1 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf03.hostedemail.com (Postfix) with ESMTP id 8E40D2000C for ; Thu, 3 Feb 2022 13:31:33 +0000 (UTC) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 213Av80j009705; Thu, 3 Feb 2022 13:31:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=pcabMoSA0vssBHPtHTJ1xHkkrc5E3PfzR96wyD8R2/4=; b=WCqvq3JHXIAuT8qhsMbeW2fVv3IWLg0mAHHTl1f6v22xmFikhy/EU0hhq7s+66gHpFwC vOZx7Il6TWXQt6oYSMeSOW9h2RoWNsvZNcdYpMvp2BpkbsDSiLdr/781iilMjG3vzWZb p97cwvIgW8Xfm7ri6SIg7s2EEfyyqFHAuMbOlU4HbBopNhYXtFgy0YYq5fAExRfyiwCb AK4by5I2Y3IK7bxnmh5N3Lzagl7PuCTbRHbOuFWA92tLyWin85gNjYmhx4p4Oe7jhV9p l5yyymR4ysHA8HdvSiFeV4+hyaPFruDNctegU/cR32DamQfPyLCiG74WqUciQLGM7KQN Ag== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e03fn6d4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Feb 2022 13:31:30 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 213D82cT000370; Thu, 3 Feb 2022 13:31:30 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e03fn6d3j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Feb 2022 13:31:30 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 213DCtWV011858; Thu, 3 Feb 2022 13:31:27 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 3dvvujxdet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Feb 2022 13:31:27 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 213DVP9Q26804726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Feb 2022 13:31:25 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 49808A405F; Thu, 3 Feb 2022 13:31:25 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8214DA405B; Thu, 3 Feb 2022 13:31:24 +0000 (GMT) Received: from p-imbrenda (unknown [9.145.1.135]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 3 Feb 2022 13:31:24 +0000 (GMT) Date: Thu, 3 Feb 2022 12:52:24 +0100 From: Claudio Imbrenda To: John Hubbard Cc: Andrew Morton , Peter Xu , Jason Gunthorpe , David Hildenbrand , Lukas Bulwahn , Jan Kara , "Kirill A . Shutemov" , Alex Williamson , Andrea Arcangeli , LKML , , Jason Gunthorpe , Christoph Hellwig Subject: Re: [PATCH v3 3/4] mm/gup: remove unused pin_user_pages_locked() Message-ID: <20220203125224.0812f5c5@p-imbrenda> In-Reply-To: <20220203093232.572380-4-jhubbard@nvidia.com> References: <20220203093232.572380-1-jhubbard@nvidia.com> <20220203093232.572380-4-jhubbard@nvidia.com> Organization: IBM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 6LykmUt2_LEZ2Ql1912HvlJaHqjXJWgC X-Proofpoint-ORIG-GUID: wm6MO6EvryZSw8jY4j7JGFKbyIL0grqZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-03_03,2022-02-03_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 suspectscore=0 clxscore=1011 phishscore=0 adultscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202030084 X-Rspam-User: nil X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 8E40D2000C X-Stat-Signature: 85zj5kqi31z7jynoza6pzq16g6g8qfj6 Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=WCqvq3JH; spf=pass (imf03.hostedemail.com: domain of imbrenda@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=imbrenda@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-HE-Tag: 1643895093-450498 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: On Thu, 3 Feb 2022 01:32:31 -0800 John Hubbard wrote: > This routine was used for a short while, but then the calling code was > refactored and the only caller was removed. > > Reviewed-by: David Hildenbrand > Reviewed-by: Jason Gunthorpe > Reviewed-by: Jan Kara > Reviewed-by: Christoph Hellwig > Signed-off-by: John Hubbard if it's not used anymore, good riddance Reviewed-by: Claudio Imbrenda > --- > include/linux/mm.h | 2 -- > mm/gup.c | 29 ----------------------------- > 2 files changed, 31 deletions(-) > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 213cc569b192..80c540c17d83 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1918,8 +1918,6 @@ long pin_user_pages(unsigned long start, unsigned long nr_pages, > struct vm_area_struct **vmas); > long get_user_pages_locked(unsigned long start, unsigned long nr_pages, > unsigned int gup_flags, struct page **pages, int *locked); > -long pin_user_pages_locked(unsigned long start, unsigned long nr_pages, > - unsigned int gup_flags, struct page **pages, int *locked); > long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages, > struct page **pages, unsigned int gup_flags); > long pin_user_pages_unlocked(unsigned long start, unsigned long nr_pages, > diff --git a/mm/gup.c b/mm/gup.c > index cad3f28492e3..b0ecbfe03928 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -3119,32 +3119,3 @@ long pin_user_pages_unlocked(unsigned long start, unsigned long nr_pages, > return get_user_pages_unlocked(start, nr_pages, pages, gup_flags); > } > EXPORT_SYMBOL(pin_user_pages_unlocked); > - > -/* > - * pin_user_pages_locked() is the FOLL_PIN variant of get_user_pages_locked(). > - * Behavior is the same, except that this one sets FOLL_PIN and rejects > - * FOLL_GET. > - */ > -long pin_user_pages_locked(unsigned long start, unsigned long nr_pages, > - unsigned int gup_flags, struct page **pages, > - int *locked) > -{ > - /* > - * FIXME: Current FOLL_LONGTERM behavior is incompatible with > - * FAULT_FLAG_ALLOW_RETRY because of the FS DAX check requirement on > - * vmas. As there are no users of this flag in this call we simply > - * disallow this option for now. > - */ > - if (WARN_ON_ONCE(gup_flags & FOLL_LONGTERM)) > - return -EINVAL; > - > - /* FOLL_GET and FOLL_PIN are mutually exclusive. */ > - if (WARN_ON_ONCE(gup_flags & FOLL_GET)) > - return -EINVAL; > - > - gup_flags |= FOLL_PIN; > - return __get_user_pages_locked(current->mm, start, nr_pages, > - pages, NULL, locked, > - gup_flags | FOLL_TOUCH); > -} > -EXPORT_SYMBOL(pin_user_pages_locked);