]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/lustre/lustre/llite/rw26.c
lustre: Convert ll_get_user_pages() to use get_user_pages_fast()
[~andy/linux] / drivers / staging / lustre / lustre / llite / rw26.c
index 96c29ad2fc8c5cd2992e766cba674bd4981fba06..7e3e0967993b5f6fecc7bfa965ef9a444cd0037f 100644 (file)
@@ -202,11 +202,8 @@ static inline int ll_get_user_pages(int rw, unsigned long user_addr,
 
        OBD_ALLOC_LARGE(*pages, *max_pages * sizeof(**pages));
        if (*pages) {
-               down_read(&current->mm->mmap_sem);
-               result = get_user_pages(current, current->mm, user_addr,
-                                       *max_pages, (rw == READ), 0, *pages,
-                                       NULL);
-               up_read(&current->mm->mmap_sem);
+               result = get_user_pages_fast(user_addr, *max_pages,
+                                            (rw == READ), *pages);
                if (unlikely(result <= 0))
                        OBD_FREE_LARGE(*pages, *max_pages * sizeof(**pages));
        }