From patchwork Sun Aug 4 22:49:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: john.hubbard@gmail.com X-Patchwork-Id: 11075171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E4B8E13A4 for ; Sun, 4 Aug 2019 22:50:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0CAF285BA for ; Sun, 4 Aug 2019 22:50:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C316028640; Sun, 4 Aug 2019 22:50:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 62984285BA for ; Sun, 4 Aug 2019 22:50:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1huPKF-0004EW-0O; Sun, 04 Aug 2019 22:50:03 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1huPKC-000440-J6 for xen-devel@lists.xenproject.org; Sun, 04 Aug 2019 22:50:00 +0000 X-Inumbo-ID: 2fd88cf1-b70a-11e9-8980-bc764e045a96 Received: from mail-pf1-x442.google.com (unknown [2607:f8b0:4864:20::442]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 2fd88cf1-b70a-11e9-8980-bc764e045a96; Sun, 04 Aug 2019 22:49:59 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id f17so34607423pfn.6 for ; 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=OIAndArdmefndwbjBRz28ajIb6cGADXpYfrUtxqYrGj8/aKvlS/QTKcI3FL5GACRgh XPw5n8e3SOOSbyyTtQM1Dd9XSbr8ttj64kDDL2YSdavVkSwC2ou5GSSma3f3sJ1KpYvg Ju7ITzp/Q6UujpeezWUpNjqVg1ZXRXYItw49e7m9k0W0DLzbLV2eX/sICA1b0DkmHRry zBYV2kfQBb5hhUsnHAQ81cYR4r1mFirXrGEbt9NPTN179i/IKhy2U4teKC2Xn282YwOh obTd7y1fUZt7ozIoUNTpFw6JKQUaGdIF1uBUU9zhoICCezgr9s5keUkeKesvBI/UEeg5 wppw== X-Gm-Message-State: APjAAAWp0mXqO6hJZfpKRQe7S0QfqtP4fmkzsEMcQRkvL8j/K0mZq4t0 TmlxIq+8h2toJn3kRrujeMI= X-Google-Smtp-Source: APXvYqwlrqrBPfbU3uzw56VyHFJ2u/Wv2Z0KkmEAsOsnKmMeY4aJMueEUB/6oS1u2+NCnzOVxWkmSA== 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 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 Subject: [Xen-devel] [PATCH v2 25/34] mm/frame_vector.c: convert put_page() to put_user_page*() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Jan Kara , kvm@vger.kernel.org, Dave Hansen , Dave Chinner , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, sparclinux@vger.kernel.org, Ira Weiny , ceph-devel@vger.kernel.org, devel@driverdev.osuosl.org, rds-devel@oss.oracle.com, linux-rdma@vger.kernel.org, x86@kernel.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , Jason Gunthorpe , Mel Gorman , xen-devel@lists.xenproject.org, devel@lists.orangefs.org, linux-media@vger.kernel.org, Vlastimil Babka , John Hubbard , intel-gfx@lists.freedesktop.org, linux-block@vger.kernel.org, =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , linux-rpi-kernel@lists.infradead.org, Dan Williams , linux-arm-kernel@lists.infradead.org, linux-nfs@vger.kernel.org, netdev@vger.kernel.org, LKML , linux-xfs@vger.kernel.org, linux-crypto@vger.kernel.org, linux-fsdevel@vger.kernel.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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;