aboutsummaryrefslogtreecommitdiffstats
path: root/mm/util.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-07 05:17:13 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-07 05:17:34 -0400
commit44347d947f628060b92449702071bfe1d31dfb75 (patch)
treec6ed74610d5b3295df4296659f80f5feb94b28cc /mm/util.c
parentd94fc523f3c35bd8013f04827e94756cbc0212f4 (diff)
parent413f81eba35d6ede9289b0c8a920c013a84fac71 (diff)
Merge branch 'linus' into tracing/core
Merge reason: tracing/core was on a .30-rc1 base and was missing out on on a handful of tracing fixes present in .30-rc5-almost. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/util.c')
-rw-r--r--mm/util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/mm/util.c b/mm/util.c
index 6794a336e9af..abc65aa7cdfc 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -225,6 +225,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
225} 225}
226#endif 226#endif
227 227
228/**
229 * get_user_pages_fast() - pin user pages in memory
230 * @start: starting user address
231 * @nr_pages: number of pages from start to pin
232 * @write: whether pages will be written to
233 * @pages: array that receives pointers to the pages pinned.
234 * Should be at least nr_pages long.
235 *
236 * Attempt to pin user pages in memory without taking mm->mmap_sem.
237 * If not successful, it will fall back to taking the lock and
238 * calling get_user_pages().
239 *
240 * Returns number of pages pinned. This may be fewer than the number
241 * requested. If nr_pages is 0 or negative, returns 0. If no pages
242 * were pinned, returns -errno.
243 */
228int __attribute__((weak)) get_user_pages_fast(unsigned long start, 244int __attribute__((weak)) get_user_pages_fast(unsigned long start,
229 int nr_pages, int write, struct page **pages) 245 int nr_pages, int write, struct page **pages)
230{ 246{