Skip to content

Commit cb10716

Browse files
committed
Convert straggling drivers to new six-argument get_user_pages()
Commit d4edcf0 ("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 cde7014: "mm/gup: Overload get_user_pages() functions"), but cause unnecessary build noise. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 264800b commit cb10716

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/platform/goldfish/goldfish_pipe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer,
309309
* much memory to the process.
310310
*/
311311
down_read(&current->mm->mmap_sem);
312-
ret = get_user_pages(current, current->mm, address, 1,
313-
!is_write, 0, &page, NULL);
312+
ret = get_user_pages(address, 1, !is_write, 0, &page, NULL);
314313
up_read(&current->mm->mmap_sem);
315314
if (ret < 0)
316315
break;

drivers/rapidio/devices/rio_mport_cdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ rio_dma_transfer(struct file *filp, uint32_t transfer_mode,
886886
}
887887

888888
down_read(&current->mm->mmap_sem);
889-
pinned = get_user_pages(current, current->mm,
889+
pinned = get_user_pages(
890890
(unsigned long)xfer->loc_addr & PAGE_MASK,
891891
nr_pages, dir == DMA_FROM_DEVICE, 0,
892892
page_list, NULL);

0 commit comments

Comments
 (0)