Merge branch 'work.get_user_pages_fast' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / staging / media / atomisp / pci / atomisp2 / hmm / hmm_bo.c
index 6e2dce7a5a2dab6402dddfa03fef09f75811e2b6..79bd540d78821f7d7d0d71944eef13b06c073f07 100644 (file)
@@ -1020,10 +1020,8 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,
        } else {
                /*Handle frame buffer allocated in user space*/
                mutex_unlock(&bo->mutex);
-               down_read(&current->mm->mmap_sem);
-               page_nr = get_user_pages((unsigned long)userptr,
-                                        (int)(bo->pgnr), 1, pages, NULL);
-               up_read(&current->mm->mmap_sem);
+               page_nr = get_user_pages_fast((unsigned long)userptr,
+                                        (int)(bo->pgnr), 1, pages);
                mutex_lock(&bo->mutex);
                bo->mem_type = HMM_BO_MEM_TYPE_USER;
        }