Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4747312ybi; Mon, 3 Jun 2019 16:57:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUN6qw0MurkbzD45xhE+dx47uNNCCJI5+du2ddfsPmDNcMGFwCVffXqzV5VABux24hNUb5 X-Received: by 2002:a63:2848:: with SMTP id o69mr31749888pgo.258.1559606265196; Mon, 03 Jun 2019 16:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559606265; cv=none; d=google.com; s=arc-20160816; b=Cu3PHU5T/E52VS4Ts/YkEGDMUdwDVV2+vV4A/1NlCJ2JOIHX8RJf0dCUSTzIOzkV3Y l67EmJauUvL05g4fXsHpQi71jAMVsJ2UGi4eRbVDbeQBTuJ3tZoJ3FTKweb1fiBccV5z ndwUOBtbqNeysqo5vvGboxVtQabiqENAsrKaxE03sno6N9lER4ZmtuxrVjL0KzymcB5H KzqSj60ydm4JM4xydX+yyQNO2jtHU8baGJf5TZBexiMq3NKo32N64l2vchD3nzuU23/T fTk3SHgrPsarXUCQDVsVW/VU3L0qOWc1WiIPGKmjYxNptEl3wjwMN3EC296qxCOZdFqg Excw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BfrVSN4ODjfVBZQclyBy3XPLkba4Y9mgxbJUUtpjQ4w=; b=SfcxVxmDY97IXlUx94ppRChkcj/Smrp1jC/XzZmitl41wsAqzKdkKEz54DyY/36JS1 Cmt18V9LKo4c+kXhZwIgjyuhMjGiOA+GOb5c+JADRa30H9/8+sQvbS5euHhk93gFnkbT MSq66Kffyi1VP0N5Rds+/YRqPR9y/lpiLf+gnJqXTU2HL6BWGV8pY1eFeFStqzcS1HlC DQDtuFgahS8B4BD4IsOl9R8uNZu8brYCZSof1njqIqec4RS9slnG7lvc4u27YdC/vBeD 5pGwpMy+fqDRwqZ++jJMMKQbHstqd3zv/SAenE+iQSmizPO+a5nH1nFVPlaCHPTvy4PM A8BQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11si19039163pgs.201.2019.06.03.16.57.28; Mon, 03 Jun 2019 16:57:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbfFCXzD (ORCPT + 99 others); Mon, 3 Jun 2019 19:55:03 -0400 Received: from mga07.intel.com ([134.134.136.100]:37239 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726101AbfFCXzC (ORCPT ); Mon, 3 Jun 2019 19:55:02 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 16:55:01 -0700 X-ExtLoop1: 1 Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga006.fm.intel.com with ESMTP; 03 Jun 2019 16:55:01 -0700 Date: Mon, 3 Jun 2019 16:56:10 -0700 From: Ira Weiny To: Christoph Hellwig Cc: Pingfan Liu , linux-mm@kvack.org, Andrew Morton , Mike Rapoport , Dan Williams , Matthew Wilcox , John Hubbard , "Aneesh Kumar K.V" , Keith Busch , linux-kernel@vger.kernel.org Subject: Re: [PATCHv2 1/2] mm/gup: fix omission of check on FOLL_LONGTERM in get_user_pages_fast() Message-ID: <20190603235610.GB29018@iweiny-DESK2.sc.intel.com> References: <1559543653-13185-1-git-send-email-kernelfans@gmail.com> <20190603164206.GB29719@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190603164206.GB29719@infradead.org> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 03, 2019 at 09:42:06AM -0700, Christoph Hellwig wrote: > > +#if defined(CONFIG_CMA) > > You can just use #ifdef here. > > > +static inline int reject_cma_pages(int nr_pinned, unsigned int gup_flags, > > + struct page **pages) > > Please use two instead of one tab to indent the continuing line of > a function declaration. > > > +{ > > + if (unlikely(gup_flags & FOLL_LONGTERM)) { > > IMHO it would be a little nicer if we could move this into the caller. FWIW we already had this discussion and thought it better to put this here. https://lkml.org/lkml/2019/5/30/1565 Ira [PS John for some reason your responses don't appear in that thread?]