Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5066312ybi; Tue, 4 Jun 2019 00:16:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwurWgn5GKmowrUORdI+4GbdVYYap1oTRsblvaseVnAS1O1ZtQOz1PDQKbLILOeC/7LyBhJ X-Received: by 2002:aa7:9095:: with SMTP id i21mr33167863pfa.119.1559632579147; Tue, 04 Jun 2019 00:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559632579; cv=none; d=google.com; s=arc-20160816; b=EmJiGB1z/Eb1KMNywE1ubimgOorJV+oteSs5xhPes2bQ5remxMRhVmsxhxlhQo5B63 jqavar4OlF+qOnZWObuughaxyMEeKhHhJxWu7HoD0gxzzGzZFIEB5trZL0ah6LZyp00c 60Ljo7Ln5zuruSDesv2BwuBpQJqP/t/X37RlE8LfYngoquB8zCD63/3UUOfPZZrTxi3k oMGrCpkS/gkYQuMQhL7stcyP5OyxLsGweDmNzTw2LYxOhysvXcqUnT9VIc/89YNWYFmk q01P1wGtm4ulf9sJXh7k9d+poC/3gMRyyKXqdplpE1vCU7Onq3UnYjM+2HIPcPkwP1q1 3Hag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Anyl5LfgBc3g4Qq9ThwWzuBDfxB1rHp0Hliwmm1saaE=; b=qIHb/rhdzGZ0tNbN9NNjGAou/qro44QmxcP+paOn3X0d5hK446WSyhZ+tLS6eqoIhR VqgXYTfSIhfyH0SQz5ZVGQUlBKF6g6oROISjbSQwogCm4evupRNB2+1ztvAbNT3ET74A /WgxXM8fNPLiclTaOR97wDzFwzoGZRtyZjjbbJ/wA++Q/9olXr8eDY8GSQwDrIgpfO+l njvWDDKM+GUYoHYIPkgb3AQp+juLu7WB01gdFoL6f9Bu/kS+L7RXFfEi+AfvHCyjJ2XD nkgwqJqx9JKbtnnazWT+TzbMLONNuNO4XnshnOMr1gaxvW5RewyEIQIiUygnj0BusAnR m9/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="SQM6/EJd"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si21890836pln.41.2019.06.04.00.16.02; Tue, 04 Jun 2019 00:16:19 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="SQM6/EJd"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbfFDHNd (ORCPT + 99 others); Tue, 4 Jun 2019 03:13:33 -0400 Received: from mail-io1-f48.google.com ([209.85.166.48]:44188 "EHLO mail-io1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbfFDHNd (ORCPT ); Tue, 4 Jun 2019 03:13:33 -0400 Received: by mail-io1-f48.google.com with SMTP id s7so9137628iob.11 for ; Tue, 04 Jun 2019 00:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Anyl5LfgBc3g4Qq9ThwWzuBDfxB1rHp0Hliwmm1saaE=; b=SQM6/EJdbswwlNhwv+y8Id3fvVx/4iyLP4qfZC+3BW6uS/hQpRfKnOscwF/5nkMtlu wP/RuvF7g/8qDceeXJJ3juses1hBi71YdrDlnzqN9CYcaKg4TPN2zP18J99DP/QbAnS5 qM15EasngRB8DXCvUNyQc82WzxDeNV4t1EQB+tmN7olJqEodZIMWRfm0ci9SnX0ydoN3 nSR8+XUIH7y+1DKUyix+FfriPayor5gVRpcW0/1KTJJzzh6+S6cg0KRhUM4Hg8rNUmNR Gp7Jgll28g9QJ/LWU6uyM38nppXr00RJSeAFhAhYmZU2q0BFoNlkpgM8qb+lZCoXZjPG q1sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Anyl5LfgBc3g4Qq9ThwWzuBDfxB1rHp0Hliwmm1saaE=; b=ZFXmtkvIUj2qJMOQ25ES2G7TUOCci8UwVfMKP717PcU1xsagFCzxnrhnuv37EAMrJy V5px6BzS2ZDLSvCdgoy81Qfns++/x1v60BQOzXR2ydpVm5m95Zzl9c7MF9n/9loSvXBh WYi1EOXkNvbf0kJa9oe2QkWenl0ArT0/ZPaw58bVMvv/x4h7zc4EziUU5kqHofWYA34W jkNXPAKCSCTg82TZjOxgQ5Rh9cyt4uHLqBj6WSvuWZA/H16W07lAY/sknS79JE0VqTfE GQbJ4h2x5DEvmeyeT+dLJdajIim5cpTfzaKoItmRc2ncGv62MctAn97om/I/FMp+VL2p UUdA== X-Gm-Message-State: APjAAAWLVf5eEosOul0dtAW1GPnJGGZOacihCJowszV/kll67TD46M+z 3hZJcYoXwT1FDV4Aj/HM/SVwp96JEN+54yPkVg== X-Received: by 2002:a6b:e005:: with SMTP id z5mr4088171iog.161.1559632412460; Tue, 04 Jun 2019 00:13:32 -0700 (PDT) MIME-Version: 1.0 References: <1559543653-13185-1-git-send-email-kernelfans@gmail.com> <20190603164206.GB29719@infradead.org> In-Reply-To: <20190603164206.GB29719@infradead.org> From: Pingfan Liu Date: Tue, 4 Jun 2019 15:13:21 +0800 Message-ID: Subject: Re: [PATCHv2 1/2] mm/gup: fix omission of check on FOLL_LONGTERM in get_user_pages_fast() To: Christoph Hellwig Cc: linux-mm@kvack.org, Ira Weiny , Andrew Morton , Mike Rapoport , Dan Williams , Matthew Wilcox , John Hubbard , "Aneesh Kumar K.V" , Keith Busch , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 4, 2019 at 12:42 AM Christoph Hellwig wrote: > > > +#if defined(CONFIG_CMA) > > You can just use #ifdef here. > OK. > > +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. > Is it a convention? scripts/checkpatch.pl can not detect it. Could you show me some light so later I can avoid it? Thanks for your review. Regards, Pingfan > > +{ > > + if (unlikely(gup_flags & FOLL_LONGTERM)) { > > IMHO it would be a little nicer if we could move this into the caller.