Browse Source

atomisp: use get_user_pages_fast()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 8 years ago
parent
commit
e1a58a5421
1 changed files with 2 additions and 4 deletions
  1. 2 4
      drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c

+ 2 - 4
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c

@@ -1029,10 +1029,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;
 	}