Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2022570ybh; Sun, 4 Aug 2019 15:52:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQW7283+LsedF50KwQC2LuPdaLBQuImmm3/7JL9cEG4A42qHOzvAdj+ohaKT/aKqyEK0t0 X-Received: by 2002:a63:484d:: with SMTP id x13mr133150789pgk.122.1564959179492; Sun, 04 Aug 2019 15:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564959179; cv=none; d=google.com; s=arc-20160816; b=BT2JqEnGs9aQyxndi8UGurxG11aBEXNOQAPIFIdSDy8CK5tSzYs+/68Q4ioTBJ+tIn qXwTND3mcOU1Yiy1k+bHvOP3IoTmmllPukUfEgMvfL+RDLASDaMzpmvS47uUr1dUwZjT gYafyfFZ2qP3VaeBqVX7w+Mx3ZPa7SpQSAjquv0NlP9Uc9YPc6umDipu9e2Hvob7vIJQ 68xwT1kmp86TM9Zug/Ts4qeAxTDpEUeI4Cbwk+b91iDVD561UN27EtPoB39eRrwpn7G5 jA7UvEZDmj7cX7HI9RCAQ/Sh1sXM4sAEP4H0kus7sKXnJxjFvlCK+o0+AriFAIefLE9S Vtmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XDFswRI13oGzit66yuxshlgOj+nOKd4gwJhAdxr7MGM=; b=FiJwPxmaq5i0wvHkeeO+c9U1wJSw5eVhDojeOLxe0AjBmdP7VBKvFPwQud+cJyESxm IE2asc6ZwyZLUbj605u9vzLXh5u4KDGRgyiw7f4BWoa70DHaohGGGyNI03fCcjAA/tXi ikd+sfq/PEpy1sca56OQp7ReRz2Tg2US9CZrmVZxkg08dcCM3WHfsK4AAcSxTJSAyLJp o6auuDn18PIOWQLrUMddEiDSuY+XywV4Spn5t+FNr3STJdkVizP0lDpGkSJJW4j09eH7 AzULqaDDsuWmM5Qxk207gLTDDeDW1ORqzNo8svs3qA80WTppbZ4x2IQR0eSJdYpmksVO h/5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rRmTjwmK; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-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 t20si30324800pgv.580.2019.08.04.15.52.46; Sun, 04 Aug 2019 15:52:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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=rRmTjwmK; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-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 S1728175AbfHDWwE (ORCPT + 99 others); Sun, 4 Aug 2019 18:52:04 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40977 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727686AbfHDWt7 (ORCPT ); Sun, 4 Aug 2019 18:49:59 -0400 Received: by mail-pf1-f194.google.com with SMTP id m30so38608480pff.8; Sun, 04 Aug 2019 15:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XDFswRI13oGzit66yuxshlgOj+nOKd4gwJhAdxr7MGM=; b=rRmTjwmKQyZXs+w2fc61p+6blqitgFt44VDlq2hBJa3msEqsCjE3iMA0N59ImENjx1 pWxFmzHovpTywgJof2duXF6btSgoIVe+p+WICBao5KO8pBkE9NcaTV9gfxHpi58Jd393 DFKgJ0xyVx8/IYN8IUERTh2Rxf2HWoXWnWj+XPN7lRyL0wmkPmCXMh8pOjTaDWP9OB/k giTYlSTz/ZRaJt6cAxVDISU3w6TbcicUIO0JMUvDlHhqw/CPHipUdbC11SYdC5WWsNXd vc/vSbii+ZbRuDVkTzr0tcFTEidEPQ4hRCQUhyIepPPKxZC6v01QDasnaLKNedkEXXRF M2wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XDFswRI13oGzit66yuxshlgOj+nOKd4gwJhAdxr7MGM=; b=ke2Y1gKrPgV/oA/60dBAHquyvJGir3hjY0nCT73PoYCpmMbCXcVpy6r40XRCNXlBhB +khwwkRyNvaYnf68aCW7ksvE5IA1f5g/wdfvXSZ+Z2/+r9x7n/ddIsCfWbFa5cIejvjW CkdXLWYzuUgD5VzrZCtpAgn8wugRQIzxgH+bziDuZsvx9hS2kKLPH0RW8jEL+MxLw4QZ nQQKf/cR/BgXl4JDWrgKD1tpGUWQ6Hyknv0vHjqxfk7sxq3imJ6LPEJ4eA2nyXuuV9oD iWhZOlea8nwefKb2UHiUhakBtuDWHzPyCG89exoji/6GrP+H7ZgU2qLAdN2ekuPLyTT/ b2Mg== X-Gm-Message-State: APjAAAXsyqpyf3dN4q+/L45kJM79UaaPm5i49YdmKWvkl+segNcvNWum 5HKEf0ORINgyNqL7uCCqP3Q= X-Received: by 2002:a63:4a51:: with SMTP id j17mr133593330pgl.284.1564958998921; Sun, 04 Aug 2019 15:49:58 -0700 (PDT) Received: from blueforge.nvidia.com (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id r6sm35946836pjb.22.2019.08.04.15.49.57 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 15:49:58 -0700 (PDT) From: john.hubbard@gmail.com X-Google-Original-From: jhubbard@nvidia.com To: Andrew Morton Cc: Christoph Hellwig , Dan Williams , Dave Chinner , Dave Hansen , Ira Weiny , Jan Kara , Jason Gunthorpe , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , LKML , amd-gfx@lists.freedesktop.org, ceph-devel@vger.kernel.org, devel@driverdev.osuosl.org, devel@lists.orangefs.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-xfs@vger.kernel.org, netdev@vger.kernel.org, rds-devel@oss.oracle.com, sparclinux@vger.kernel.org, x86@kernel.org, xen-devel@lists.xenproject.org, John Hubbard , Mel Gorman , Vlastimil Babka Subject: [PATCH v2 25/34] mm/frame_vector.c: convert put_page() to put_user_page*() Date: Sun, 4 Aug 2019 15:49:06 -0700 Message-Id: <20190804224915.28669-26-jhubbard@nvidia.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190804224915.28669-1-jhubbard@nvidia.com> References: <20190804224915.28669-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: John Hubbard For pages that were retained via get_user_pages*(), release those pages via the new put_user_page*() routines, instead of via put_page() or release_pages(). This is part a tree-wide conversion, as described in commit fc1d8e7cca2d ("mm: introduce put_user_page*(), placeholder versions"). Cc: Dan Williams Cc: Jan Kara Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: John Hubbard --- mm/frame_vector.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/frame_vector.c b/mm/frame_vector.c index c64dca6e27c2..f590badac776 100644 --- a/mm/frame_vector.c +++ b/mm/frame_vector.c @@ -120,7 +120,6 @@ EXPORT_SYMBOL(get_vaddr_frames); */ void put_vaddr_frames(struct frame_vector *vec) { - int i; struct page **pages; if (!vec->got_ref) @@ -133,8 +132,7 @@ void put_vaddr_frames(struct frame_vector *vec) */ if (WARN_ON(IS_ERR(pages))) goto out; - for (i = 0; i < vec->nr_frames; i++) - put_page(pages[i]); + put_user_pages(pages, vec->nr_frames); vec->got_ref = false; out: vec->nr_frames = 0; -- 2.22.0