VM: add "vm_munmap()" helper function
[firefly-linux-kernel-4.4.55.git] / include / linux / mm.h
index 69f6d7b7eb019d420eef1249c4c36638c5aeeb6a..cb61950a3aa17e08c7291242abf261ce06e6606e 100644 (file)
@@ -6,6 +6,7 @@
 #ifdef __KERNEL__
 
 #include <linux/gfp.h>
+#include <linux/bug.h>
 #include <linux/list.h>
 #include <linux/mmzone.h>
 #include <linux/rbtree.h>
@@ -111,7 +112,7 @@ extern unsigned int kobjsize(const void *objp);
 #define VM_HUGEPAGE    0x01000000      /* MADV_HUGEPAGE marked this vma */
 #endif
 #define VM_INSERTPAGE  0x02000000      /* The vma has had "vm_insert_page()" done on it */
-#define VM_ALWAYSDUMP  0x04000000      /* Always include in core dumps */
+#define VM_NODUMP      0x04000000      /* Do not include in the core dump */
 
 #define VM_CAN_NONLINEAR 0x08000000    /* Has ->fault & does nonlinear pages */
 #define VM_MIXEDMAP    0x10000000      /* Can contain "struct page" and pure PFN pages */
@@ -953,7 +954,7 @@ extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new);
 extern void truncate_setsize(struct inode *inode, loff_t newsize);
 extern int vmtruncate(struct inode *inode, loff_t offset);
 extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end);
-
+void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end);
 int truncate_inode_page(struct address_space *mapping, struct page *page);
 int generic_error_remove_page(struct address_space *mapping, struct page *page);
 
@@ -1414,7 +1415,9 @@ out:
 
 extern int do_munmap(struct mm_struct *, unsigned long, size_t);
 
-extern unsigned long do_brk(unsigned long, unsigned long);
+/* These take the mm semaphore themselves */
+extern unsigned long vm_brk(unsigned long, unsigned long);
+extern int vm_munmap(struct mm_struct *, unsigned long, size_t);
 
 /* truncate.c */
 extern void truncate_inode_pages(struct address_space *, loff_t);