Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106186
b: refs/heads/master
c: f5dd33c
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jul 26, 2008
1 parent e5f03a4 commit ae1f1d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8174c430e445a93016ef18f717fe570214fa38bf
refs/heads/master: f5dd33c494a427b1d1a3b574de5c9e511c888864
8 changes: 2 additions & 6 deletions trunk/fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,12 +721,8 @@ static struct bio *__bio_map_user_iov(struct request_queue *q,
const int local_nr_pages = end - start;
const int page_limit = cur_page + local_nr_pages;

down_read(&current->mm->mmap_sem);
ret = get_user_pages(current, current->mm, uaddr,
local_nr_pages,
write_to_vm, 0, &pages[cur_page], NULL);
up_read(&current->mm->mmap_sem);

ret = get_user_pages_fast(uaddr, local_nr_pages,
write_to_vm, &pages[cur_page]);
if (ret < local_nr_pages) {
ret = -EFAULT;
goto out_unmap;
Expand Down
10 changes: 2 additions & 8 deletions trunk/fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(&current->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(&current->mm->mmap_sem);
&dio->pages[0]); /* Put results here */

if (ret < 0 && dio->blocks_available && (dio->rw & WRITE)) {
struct page *page = ZERO_PAGE(0);
Expand Down

0 comments on commit ae1f1d4

Please sign in to comment.