CC: linux-scsi@xxxxxxxxxxxxxxx CC: Kai Makisara <Kai.Makisara@xxxxxxxxxxx> Signed-off-by: Jan Kara <jack@xxxxxxx> --- drivers/scsi/st.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index ff44b3c2cff2..ba11299c3740 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -4514,19 +4514,11 @@ static int sgl_map_user_pages(struct st_buffer *STbp, if ((pages = kmalloc(max_pages * sizeof(*pages), GFP_KERNEL)) == NULL) return -ENOMEM; - /* Try to fault in all of the necessary pages */ - down_read(¤t->mm->mmap_sem); - /* rw==READ means read from drive, write into memory area */ - res = get_user_pages( - current, - current->mm, - uaddr, - nr_pages, - rw == READ, - 0, /* don't force */ - pages, - NULL); - up_read(¤t->mm->mmap_sem); + /* + * Try to fault in all of the necessary pages. rw==READ means read + * from drive, write into memory area. + */ + res = get_user_pages_fast(uaddr, nr_pages, rw == READ, pages); /* Errors and no page mapped should return here */ if (res < nr_pages) -- 1.8.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>