Message ID | 20190802022005.5117-33-jhubbard@nvidia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <ceph-devel-owner@kernel.org> 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 7C5E7186E for <patchwork-ceph-devel@patchwork.kernel.org>; Fri, 2 Aug 2019 02:21:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FBC62877B for <patchwork-ceph-devel@patchwork.kernel.org>; Fri, 2 Aug 2019 02:21:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63BE5287BA; Fri, 2 Aug 2019 02:21:53 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15676287CB for <patchwork-ceph-devel@patchwork.kernel.org>; Fri, 2 Aug 2019 02:21:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389249AbfHBCVi (ORCPT <rfc822;patchwork-ceph-devel@patchwork.kernel.org>); Thu, 1 Aug 2019 22:21:38 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33227 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388969AbfHBCVD (ORCPT <rfc822;ceph-devel@vger.kernel.org>); Thu, 1 Aug 2019 22:21:03 -0400 Received: by mail-pl1-f196.google.com with SMTP id c14so32935895plo.0; Thu, 01 Aug 2019 19:21:02 -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=t4E5L+nteFApbv8x9BTzZhAA9CrCHyfc4N+4wDD55sE=; b=hrmJ0pEUxxlEVbmnkJiCuXB+z0obVkpM5OAxcIB8ex62qKsRGc8GrJbesoMFhr0ezJ BB7gqJEvJ/0j1sMNBYjptk6WEDqh/SuRhAh3YnXCDA+D03E9VD/w0ZTpWsRp/gFtvqDb GPSJBQRO2YGZ2n4ciW9tAFCe3EDjB9OuDXHwxqBfuLFzCDYC5sbEZNesZN0XL0xy/T+d A/rrSMYh6KaPOeAYQGAhhvKvLVo5NyuQKSBc7dnWcPrp/sW9C+D3tHmYcyJ9WgLD0vU4 zE+pn4brWMiLPK0lo9h6ZHMbPaOqGStN6e8qWC9iDeImsGRohVaoMFw5HAYT+EunHz7d Gu7A== 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=t4E5L+nteFApbv8x9BTzZhAA9CrCHyfc4N+4wDD55sE=; b=iOqJQxdTtEZfgHGO9ebK4FRp2R+CH5nUTFNW8fAwgzFkn9iylKLILOr6rbWRs2MDmp JLIrsjJkjJc4+H9EUkYEjE8Ca4KYACz5CLHeQKWvVaDN0Sr2hDcXEyCgtaDYIiIdTJWi P6YcNkR2bMdqpQJJ5IWOuhkw+gwljOZHgeeTUIpSQm0/11Mn319ALI1GEUMsW463ozfs VNLRi62Zz9yzgmqDffOQQcg9pFQqNthIt+ol3TbHKJOTwgeVlCGtFnDcY70dgQmnjeUG g1qIEpzW3eIDfkR/0NfyhMuqEDqKIMj2t/U2JlMiAA5NypJEwrtDv1VKWdxD8HQMyfDJ cM6Q== X-Gm-Message-State: APjAAAVX57W1wL0z6pdnc+7VRuIKLMbBof22tIfT/lau0lOvshsmtE/T lOKcbIj9tYo+xmSEtIKhP5t7fZRLNoE= X-Google-Smtp-Source: APXvYqwMLKf8AGC5hDWCQUPLqudyxsaLfy2JXIWmRI5mzRP+HqysSD+VYVGt/11B9bnV5geCVBXglQ== X-Received: by 2002:a17:902:20ec:: with SMTP id v41mr122012162plg.142.1564712462015; Thu, 01 Aug 2019 19:21:02 -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.21.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 19:21:01 -0700 (PDT) From: john.hubbard@gmail.com X-Google-Original-From: jhubbard@nvidia.com To: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Hellwig <hch@infradead.org>, Dan Williams <dan.j.williams@intel.com>, Dave Chinner <david@fromorbit.com>, Dave Hansen <dave.hansen@linux.intel.com>, Ira Weiny <ira.weiny@intel.com>, Jan Kara <jack@suse.cz>, Jason Gunthorpe <jgg@ziepe.ca>, =?utf-8?b?SsOpcsO0?= =?utf-8?b?bWUgR2xpc3Nl?= <jglisse@redhat.com>, LKML <linux-kernel@vger.kernel.org>, 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 <jhubbard@nvidia.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Roman Kiryanov <rkir@google.com> Subject: [PATCH 32/34] goldfish_pipe: convert put_page() to put_user_page*() Date: Thu, 1 Aug 2019 19:20:03 -0700 Message-Id: <20190802022005.5117-33-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 Content-Transfer-Encoding: 8bit Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: <ceph-devel.vger.kernel.org> X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
put_user_pages(): miscellaneous call sites
|
expand
|
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index cef0133aa47a..2bd21020e288 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -288,15 +288,12 @@ static int pin_user_pages(unsigned long first_page, static void release_user_pages(struct page **pages, int pages_count, int is_write, s32 consumed_size) { - int i; + bool dirty = !is_write && consumed_size > 0; - for (i = 0; i < pages_count; i++) { - if (!is_write && consumed_size > 0) - set_page_dirty(pages[i]); - put_page(pages[i]); - } + put_user_pages_dirty_lock(pages, pages_count, dirty); } + /* Populate the call parameters, merging adjacent pages together */ static void populate_rw_params(struct page **pages, int pages_count,