[PATCH v2 03/34] net/ceph: convert put_page() to put_user_page*()

john.hubbard
2019-08-04T22:49:30Z

Acked-by: Jeff Layton <jlayton@kernel.org>

Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Sage Weil <sage@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: ceph-devel@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
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);
--
2.22.0