From patchwork Fri Aug 2 02:19:34 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: 11071751 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 C7961746 for ; Fri, 2 Aug 2019 02:20:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9CE628701 for ; Fri, 2 Aug 2019 02:20:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC6A7287C0; Fri, 2 Aug 2019 02:20:22 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43D8328701 for ; Fri, 2 Aug 2019 02:20:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3AB566B000C; Thu, 1 Aug 2019 22:20:18 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 335306B000D; Thu, 1 Aug 2019 22:20:18 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 187E56B000E; Thu, 1 Aug 2019 22:20:18 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by kanga.kvack.org (Postfix) with ESMTP id D59B86B000C for ; Thu, 1 Aug 2019 22:20:17 -0400 (EDT) Received: by mail-pg1-f199.google.com with SMTP id p15so2815108pgl.18 for ; Thu, 01 Aug 2019 19:20:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=weSPcOAlMB+nks0BWLOsxsBmAu907UZGrfndvq6oQnc=; b=SCZofcUrpvn/j+LPY8F9zc3BJ+vXlD1Kh/yxqS/KUob93I2XUinFmYDg4GU3nm9/eY H/cIuluDy5IFSzkZYUlAXtILWOhdvfnJiMK2xou54kToqstmLhrMgZobtFoKG1zX2FhY oVgmmFRI8EnQK+ReIBCyTwrO88uj0VhhEFx7CBhRM+LAf6X1WQDoWGzcs2m2A+8qCSUV JVU8ZeRFPWNzUuEq6+wOdHDI1d9+EAZ/ytOSxyoajOoo9PPlX0NfmCgSzg3VCAJJKVGJ a8BXxh7IeN1eoqMxUukaVktsZ1zEStRuDYQ83f+OgKcIh4xfwz+1+SE2etA4qtMuqhnc u+zg== X-Gm-Message-State: APjAAAUubcgPpXxpCwgxMHUGWX/mXNXbrVF2iFwaqkEnJUoNqJGaoVRP yEGCCfoVeM4muUXW+exEPLi2kUZc/6Tdadj3OS0hlEHLxKowgcjhJQgIUMeuv2YfqZlm8d4X0OE /D30kwVfuH0gLNjjKOQTSAprzd/ln59DlD3+98Y479rAoYX4jJkUPd60Z2AGJJu3oBw== X-Received: by 2002:a17:902:2ac8:: with SMTP id j66mr123173293plb.273.1564712417521; Thu, 01 Aug 2019 19:20:17 -0700 (PDT) X-Received: by 2002:a17:902:2ac8:: with SMTP id j66mr123173247plb.273.1564712416705; Thu, 01 Aug 2019 19:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564712416; cv=none; d=google.com; s=arc-20160816; b=D3EChVHO/WfnbSC29Oh2EQ/UxnVo73+mGqhE83rA5hMg+GAAJT13VMN5JbEnIGJPJy kfZvf2PoFXvJFIK5OtuirbGmHBB3ek9tRcQ82DM4uovozRnMpgZQbFkcdgRh+oGXwwGl cHoQuV13eiHzSfqeGyE0YPbZCkaGEj5vFGoC2A9q8gO2mhx91RkWaOAgo+FxD7Ka2VVg 3glghlKZokS+QCT8UhK/wmTmxqAIwIq1rM8WfknKdTb1JuIl/44z2Cjnvs1jLVEXRa2Z ks7H/5nOKMs8HOAWzNwn1Vw9jxGeK7qs5yVGDkYmTSudoUFCBxLqLyMRd5XGDs7zbGwc +PKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=weSPcOAlMB+nks0BWLOsxsBmAu907UZGrfndvq6oQnc=; b=N5iDwgag+m9FVnGtMw/RZuimC5SkDmXMDMxZ3GVLbHBFuGXQKxJ5txhtAlMsGGt/Vi v6YjW8J5bYjSh+OVqkvqKLcYaTa6C6gTliQGFF3KSraWhI7cmqFXNB1LhAlXED1QXd/h rYYd3AIUFfjDq7HAFOCrMj7+d6GCNlE8kbt/8rucdz3NSs6wjK6Io41jSfeLuSJpnYDW xu46T205MyRa16pyv7HPKZ8TMyKxMwtyibrEEGy2twoV+guwx7gGMOU1gduhtuLuIOtM DTuAO1i5+o5B2EdKai7XwgWzKm9ulqU+n/2qg6YMHKig9BieKET07J3LrxGLQWlXAK/R myGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="g/PNAVO1"; spf=pass (google.com: domain of john.hubbard@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.hubbard@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id g4sor89047610plt.30.2019.08.01.19.20.16 for (Google Transport Security); Thu, 01 Aug 2019 19:20:16 -0700 (PDT) Received-SPF: pass (google.com: domain of john.hubbard@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="g/PNAVO1"; spf=pass (google.com: domain of john.hubbard@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.hubbard@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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=weSPcOAlMB+nks0BWLOsxsBmAu907UZGrfndvq6oQnc=; b=g/PNAVO1jcA7rjmvur5Gi5SyBm+cHCwd0FZu0S4Yd4WKYY8nqKUy+Kjq5L8LbAIDam oq+DMw/apiFaV6V9t2AYTvJ0UtZRGdqpPgiFYeIHq5U9A659jHv3iijVBsi80zStn1WW yA7d3ZYX2ikKALXpz54vXEPMXgXSlYxT87JksMZBQueD34Vn0QLhvvHOTCuzyirgAxhY PS1hXIRKbtV044f7MD5ThhAFxJavcS5DN9nP30sURDOyWv4TACAbp0MhELnCZVrxEr+Y L5R1pu68TEBkTXOjXzFMyL79KTHMlgJNcYv+KmIulF31bskwh/7J7wKRv6nstiIy1Eix KMbg== X-Google-Smtp-Source: APXvYqxciGgcMDXcQ3A2dbcQcp1f7eltXWtJvGVKyn0lRu+bq9UEFtA9QCl9A6sNDZqj7/W8XpREEA== X-Received: by 2002:a17:90a:2385:: with SMTP id g5mr1977411pje.12.1564712416439; Thu, 01 Aug 2019 19:20:16 -0700 (PDT) Received: from blueforge.nvidia.com (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id u9sm38179744pgc.5.2019.08.01.19.20.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 19:20:16 -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?b?SsOpcsO0?= =?utf-8?b?bWUgR2xpc3Nl?= , 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 , Ilya Dryomov , Sage Weil , "David S . Miller" Subject: [PATCH 03/34] net/ceph: convert put_page() to put_user_page*() Date: Thu, 1 Aug 2019 19:19:34 -0700 Message-Id: <20190802022005.5117-4-jhubbard@nvidia.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802022005.5117-1-jhubbard@nvidia.com> References: <20190802022005.5117-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: Ilya Dryomov Cc: Sage Weil Cc: David S. Miller Cc: ceph-devel@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: John Hubbard Acked-by: Jeff Layton --- net/ceph/pagevec.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c index 64305e7056a1..c88fff2ab9bd 100644 --- a/net/ceph/pagevec.c +++ b/net/ceph/pagevec.c @@ -12,13 +12,7 @@ void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty) { - int i; - - for (i = 0; i < num_pages; i++) { - if (dirty) - set_page_dirty_lock(pages[i]); - put_page(pages[i]); - } + put_user_pages_dirty_lock(pages, num_pages, dirty); kvfree(pages); } EXPORT_SYMBOL(ceph_put_page_vector);