diff options
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 128d3b55bdd9..9a1c34205254 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -4551,18 +4551,15 @@ static int sgl_map_user_pages(struct st_buffer *STbp, | |||
4551 | return -ENOMEM; | 4551 | return -ENOMEM; |
4552 | 4552 | ||
4553 | /* Try to fault in all of the necessary pages */ | 4553 | /* Try to fault in all of the necessary pages */ |
4554 | down_read(¤t->mm->mmap_sem); | ||
4555 | /* rw==READ means read from drive, write into memory area */ | 4554 | /* rw==READ means read from drive, write into memory area */ |
4556 | res = get_user_pages( | 4555 | res = get_user_pages_unlocked( |
4557 | current, | 4556 | current, |
4558 | current->mm, | 4557 | current->mm, |
4559 | uaddr, | 4558 | uaddr, |
4560 | nr_pages, | 4559 | nr_pages, |
4561 | rw == READ, | 4560 | rw == READ, |
4562 | 0, /* don't force */ | 4561 | 0, /* don't force */ |
4563 | pages, | 4562 | pages); |
4564 | NULL); | ||
4565 | up_read(¤t->mm->mmap_sem); | ||
4566 | 4563 | ||
4567 | /* Errors and no page mapped should return here */ | 4564 | /* Errors and no page mapped should return here */ |
4568 | if (res < nr_pages) | 4565 | if (res < nr_pages) |