mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
dio: use get_user_pages_fast
Use get_user_pages_fast in the common/generic block and fs direct IO paths. Signed-off-by: Nick Piggin <[email protected]> Cc: Dave Kleikamp <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Dave Kleikamp <[email protected]> Cc: Badari Pulavarty <[email protected]> Cc: Zach Brown <[email protected]> Cc: Jens Axboe <[email protected]> Reviewed-by: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8174c430e4
commit
f5dd33c494
2 changed files with 4 additions and 14 deletions
|
|
@ -150,17 +150,11 @@ static int dio_refill_pages(struct dio *dio)
|
|||
int nr_pages;
|
||||
|
||||
nr_pages = min(dio->total_pages - dio->curr_page, DIO_PAGES);
|
||||
down_read(¤t->mm->mmap_sem);
|
||||
ret = get_user_pages(
|
||||
current, /* Task for fault acounting */
|
||||
current->mm, /* whose pages? */
|
||||
ret = get_user_pages_fast(
|
||||
dio->curr_user_address, /* Where from? */
|
||||
nr_pages, /* How many pages? */
|
||||
dio->rw == READ, /* Write to memory? */
|
||||
0, /* force (?) */
|
||||
&dio->pages[0],
|
||||
NULL); /* vmas */
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
&dio->pages[0]); /* Put results here */
|
||||
|
||||
if (ret < 0 && dio->blocks_available && (dio->rw & WRITE)) {
|
||||
struct page *page = ZERO_PAGE(0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue