aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h27
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
1394extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); 1394extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
1395 1395
1396extern 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);
1399extern unsigned long mmap_region(struct file *file, unsigned long addr, 1396extern 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 1399extern unsigned long do_mmap(struct file *, unsigned long,
1403static 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);
1412out:
1413 return ret;
1414}
1415
1416extern int do_munmap(struct mm_struct *, unsigned long, size_t); 1402extern int do_munmap(struct mm_struct *, unsigned long, size_t);
1417 1403
1418extern unsigned long do_brk(unsigned long, unsigned long); 1404/* These take the mm semaphore themselves */
1405extern unsigned long vm_brk(unsigned long, unsigned long);
1406extern int vm_munmap(unsigned long, size_t);
1407extern 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 */
1421extern void truncate_inode_pages(struct address_space *, loff_t); 1412extern void truncate_inode_pages(struct address_space *, loff_t);