diff options
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r-- | fs/direct-io.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 9e81addbd6ea..9606ee848fd8 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -150,17 +150,11 @@ static int dio_refill_pages(struct dio *dio) | |||
150 | int nr_pages; | 150 | int nr_pages; |
151 | 151 | ||
152 | nr_pages = min(dio->total_pages - dio->curr_page, DIO_PAGES); | 152 | nr_pages = min(dio->total_pages - dio->curr_page, DIO_PAGES); |
153 | down_read(¤t->mm->mmap_sem); | 153 | ret = get_user_pages_fast( |
154 | ret = get_user_pages( | ||
155 | current, /* Task for fault acounting */ | ||
156 | current->mm, /* whose pages? */ | ||
157 | dio->curr_user_address, /* Where from? */ | 154 | dio->curr_user_address, /* Where from? */ |
158 | nr_pages, /* How many pages? */ | 155 | nr_pages, /* How many pages? */ |
159 | dio->rw == READ, /* Write to memory? */ | 156 | dio->rw == READ, /* Write to memory? */ |
160 | 0, /* force (?) */ | 157 | &dio->pages[0]); /* Put results here */ |
161 | &dio->pages[0], | ||
162 | NULL); /* vmas */ | ||
163 | up_read(¤t->mm->mmap_sem); | ||
164 | 158 | ||
165 | if (ret < 0 && dio->blocks_available && (dio->rw & WRITE)) { | 159 | if (ret < 0 && dio->blocks_available && (dio->rw & WRITE)) { |
166 | struct page *page = ZERO_PAGE(0); | 160 | struct page *page = ZERO_PAGE(0); |