Commit cb107161 authored by Linus Torvalds's avatar Linus Torvalds

Convert straggling drivers to new six-argument get_user_pages()

Commit d4edcf0d ("mm/gup: Switch all callers of get_user_pages() to
not pass tsk/mm") switched get_user_pages() callers to the simpler model
where they no longer pass in the thread and mm pointer.  But since then
we've merged changes to a few drivers that re-introduce use of the old
interface.  Let's fix them up.

They continued to work fine (thanks to the truly disgusting macros
introduced in commit cde70140: "mm/gup: Overload get_user_pages()
functions"), but cause unnecessary build noise.
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 264800b5
...@@ -309,8 +309,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer, ...@@ -309,8 +309,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer,
* much memory to the process. * much memory to the process.
*/ */
down_read(&current->mm->mmap_sem); down_read(&current->mm->mmap_sem);
ret = get_user_pages(current, current->mm, address, 1, ret = get_user_pages(address, 1, !is_write, 0, &page, NULL);
!is_write, 0, &page, NULL);
up_read(&current->mm->mmap_sem); up_read(&current->mm->mmap_sem);
if (ret < 0) if (ret < 0)
break; break;
......
...@@ -886,7 +886,7 @@ rio_dma_transfer(struct file *filp, uint32_t transfer_mode, ...@@ -886,7 +886,7 @@ rio_dma_transfer(struct file *filp, uint32_t transfer_mode,
} }
down_read(&current->mm->mmap_sem); down_read(&current->mm->mmap_sem);
pinned = get_user_pages(current, current->mm, pinned = get_user_pages(
(unsigned long)xfer->loc_addr & PAGE_MASK, (unsigned long)xfer->loc_addr & PAGE_MASK,
nr_pages, dir == DMA_FROM_DEVICE, 0, nr_pages, dir == DMA_FROM_DEVICE, 0,
page_list, NULL); page_list, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment