Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4806128ybh; Tue, 6 Aug 2019 18:38:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrE3DXcL9g2/6mRIkt0nGxinZ0vJfdm7WDN8bQhsSCi6fSG8Zc6C2pO4afH1tmC6VzbSC8 X-Received: by 2002:a17:902:2889:: with SMTP id f9mr5554743plb.230.1565141880731; Tue, 06 Aug 2019 18:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565141880; cv=none; d=google.com; s=arc-20160816; b=Fj2Z7xfuQBh98wjFrz5pg8rku1ei0fU8OngI8O6N85xVpdFFFViDddAEG/yuNo3h38 Hi92bXwSegv23yvgQ8wyyaiDDDjon4Qt6Zx7kCZZYmHPyVeEdvcdpKhvIsffQ4qet+/5 KRONSXR6tflxRArs0QLchZk6skI/svw8VnRLQe6hb0cwkzKfMeLtCgny3LjnQE0oKJpl nEblyFM0S/nQeKCK5fTTtKZMrjp1aq/SD4Exj+OPvWvEurra6329950NNaGxuGCt3jth VV7cYlaaptMcj0I+9K4kEAesLRMUKsJl9muK54643o48bWCaYIOUimaAHsa/C99OYCUW M0wg== 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=mTptEap3QpUC9l3Uv7SE2cM8sMT1hYd57KxD+tvQ268SmRbz2cnNdmR7X5BsU7y/It aWLqAv168Rw8yqcVWMo8mzlp1UOl96Os7b1FBoTHdabs196PBKa0DjMwTRT8b/fi9/iB kD+Sl8j/uISwfbhu78Q+CvQRggTCfMA3JZZ+05yBSJ318CoIJ3ZMt8s9Cdl/Rvj01BN9 vghu5m1lluaiXkGRAjTPM66Lv5PV+hfLBfCRuPHxwJSez+LKMSuKV483PZ1B2tjHRKsF Ib75UvfMV8p4SCas2gZASVzMsVtpOX2XoIlwgjIeJQIqQmD/oEEQZsRtf4QFhoJj8rPN 0wvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X+oC46vd; 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 z12si40995162pfc.99.2019.08.06.18.37.47; Tue, 06 Aug 2019 18:38:00 -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=X+oC46vd; 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 S1730150AbfHGBhe (ORCPT + 99 others); Tue, 6 Aug 2019 21:37:34 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36714 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729712AbfHGBe3 (ORCPT ); Tue, 6 Aug 2019 21:34:29 -0400 Received: by mail-pg1-f193.google.com with SMTP id l21so42540552pgm.3; Tue, 06 Aug 2019 18:34:28 -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=X+oC46vd7xsqyIlCfk9jfvvzV6KsruG8Ld3KbyZxbsoEi8/HO1GbnyS051djmD0t5e IHHS/+1UxUZwPEi5YIHD09i1hw+sYQFPMWL5MXVDvXn8jTsvyuss+94LZL/cM8p3bjpq d4b4EaFpAv2r0fuq82w4gX6G8xDhtpwliffNpgIRnaMzTN6SuMgZ7nNfOclK8ThivKOZ 7xyX43NI19Uw1hhV+vBLTAkRAlmFP4cWwG7rBuQsdFHL+GJXdhmd4ykYSxe8XYPo9VdG z0ekXKuUssjo5Om7rTdk/VGJmbSK9hbVth13oi1xkOKAckGir4q2yshriVnE4uLo3fC5 EABw== 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=gBo+KwoVYsjc76HHLlqsGgAogwvM9fLz2h/UGTkqf0P9aC6n0eUn5mPZP5ZxSX7J0e SskBfHRL7ZMFCVMaA0eKd+NiaohVNoQ8aAcBQXacl/gtcn5xvR6ZmouNmi/6uMcR7PyN rxcUbtlDAMd1EHaDOS1B1CTw/Td2hMkoWu7NXggUNtK16fXx/vnok3E3YMSxYm1kYW7y vs3We14/OX1gO2VYdcAgJR/Ccz11DJzF0vVgns+D85uZO8/3NK7sf4rd/3cG2/Sxys75 6Ol2yjPvwOPwyXshpLYrxqkaOV7NqR3AfhvMNMdBCNL0MwuUXrQkyGBTdypQ/evx92EV e2Aw== X-Gm-Message-State: APjAAAUaUCTfN21jQdSoYvv/TYKn8duvkCwEENxiAdT1NqMrcB4/KDn0 O0THtrA2gTQm+Cax3QnW2A4= X-Received: by 2002:a65:5202:: with SMTP id o2mr5279108pgp.29.1565141668202; Tue, 06 Aug 2019 18:34:28 -0700 (PDT) Received: from blueforge.nvidia.com (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id u69sm111740800pgu.77.2019.08.06.18.34.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 06 Aug 2019 18:34:27 -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 v3 27/41] mm/frame_vector.c: convert put_page() to put_user_page*() Date: Tue, 6 Aug 2019 18:33:26 -0700 Message-Id: <20190807013340.9706-28-jhubbard@nvidia.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190807013340.9706-1-jhubbard@nvidia.com> References: <20190807013340.9706-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