diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index d8738a464b94..74aa71bea1e4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1393,29 +1393,20 @@ extern int install_special_mapping(struct mm_struct *mm, | |||
1393 | 1393 | ||
1394 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1394 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
1395 | 1395 | ||
1396 | extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | ||
1397 | unsigned long len, unsigned long prot, | ||
1398 | unsigned long flag, unsigned long pgoff); | ||
1399 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1396 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
1400 | unsigned long len, unsigned long flags, | 1397 | unsigned long len, unsigned long flags, |
1401 | vm_flags_t vm_flags, unsigned long pgoff); | 1398 | vm_flags_t vm_flags, unsigned long pgoff); |
1402 | 1399 | extern unsigned long do_mmap(struct file *, unsigned long, | |
1403 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1400 | unsigned long, unsigned long, |
1404 | unsigned long len, unsigned long prot, | 1401 | unsigned long, unsigned long); |
1405 | unsigned long flag, unsigned long offset) | ||
1406 | { | ||
1407 | unsigned long ret = -EINVAL; | ||
1408 | if ((offset + PAGE_ALIGN(len)) < offset) | ||
1409 | goto out; | ||
1410 | if (!(offset & ~PAGE_MASK)) | ||
1411 | ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT); | ||
1412 | out: | ||
1413 | return ret; | ||
1414 | } | ||
1415 | |||
1416 | extern int do_munmap(struct mm_struct *, unsigned long, size_t); | 1402 | extern int do_munmap(struct mm_struct *, unsigned long, size_t); |
1417 | 1403 | ||
1418 | extern unsigned long do_brk(unsigned long, unsigned long); | 1404 | /* These take the mm semaphore themselves */ |
1405 | extern unsigned long vm_brk(unsigned long, unsigned long); | ||
1406 | extern int vm_munmap(unsigned long, size_t); | ||
1407 | extern unsigned long vm_mmap(struct file *, unsigned long, | ||
1408 | unsigned long, unsigned long, | ||
1409 | unsigned long, unsigned long); | ||
1419 | 1410 | ||
1420 | /* truncate.c */ | 1411 | /* truncate.c */ |
1421 | extern void truncate_inode_pages(struct address_space *, loff_t); | 1412 | extern void truncate_inode_pages(struct address_space *, loff_t); |