From: John Hubbard <jhubb...@nvidia.com>

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: Joerg Roedel <j...@8bytes.org>
Cc: Paolo Bonzini <pbonz...@redhat.com>
Cc: Radim Krčmář <rkrc...@redhat.com>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: Borislav Petkov <b...@alien8.de>
Cc: H. Peter Anvin <h...@zytor.com>
Cc: x...@kernel.org
Cc: k...@vger.kernel.org
Signed-off-by: John Hubbard <jhubb...@nvidia.com>
---
 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c 
b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index e8778ebb72e6..a0144a5ee325 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
@@ -686,7 +686,7 @@ static int etnaviv_gem_userptr_get_pages(struct 
etnaviv_gem_object *etnaviv_obj)
                ret = get_user_pages_fast(ptr, num_pages,
                                          !userptr->ro ? FOLL_WRITE : 0, pages);
                if (ret < 0) {
-                       release_pages(pvec, pinned);
+                       put_user_pages(pvec, pinned);
                        kvfree(pvec);
                        return ret;
                }
@@ -710,7 +710,7 @@ static void etnaviv_gem_userptr_release(struct 
etnaviv_gem_object *etnaviv_obj)
        if (etnaviv_obj->pages) {
                int npages = etnaviv_obj->base.size >> PAGE_SHIFT;
 
-               release_pages(etnaviv_obj->pages, npages);
+               put_user_pages(etnaviv_obj->pages, npages);
                kvfree(etnaviv_obj->pages);
        }
 }
-- 
2.22.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to