lustre: Convert ll_get_user_pages() to use get_user_pages_fast()

CC: Peng Tao <tao.peng@emc.com>
Acked-by: Andreas Dilger <andreas.dilger@intel.com>
CC: hpdd-discuss@lists.01.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jan Kara 2013-10-02 16:27:51 +02:00 committed by Greg Kroah-Hartman
parent f30bd6855c
commit d1a168eccf
1 changed files with 2 additions and 5 deletions

View 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));
}