diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index b6eae5e3144b..24c395694f4d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -288,7 +288,7 @@ static inline int is_vmalloc_addr(const void *x) | |||
288 | #ifdef CONFIG_MMU | 288 | #ifdef CONFIG_MMU |
289 | extern int is_vmalloc_or_module_addr(const void *x); | 289 | extern int is_vmalloc_or_module_addr(const void *x); |
290 | #else | 290 | #else |
291 | static int is_vmalloc_or_module_addr(const void *x) | 291 | static inline int is_vmalloc_or_module_addr(const void *x) |
292 | { | 292 | { |
293 | return 0; | 293 | return 0; |
294 | } | 294 | } |
@@ -695,11 +695,12 @@ static inline int page_mapped(struct page *page) | |||
695 | #define VM_FAULT_SIGBUS 0x0002 | 695 | #define VM_FAULT_SIGBUS 0x0002 |
696 | #define VM_FAULT_MAJOR 0x0004 | 696 | #define VM_FAULT_MAJOR 0x0004 |
697 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 697 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
698 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned page */ | ||
698 | 699 | ||
699 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 700 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
700 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 701 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
701 | 702 | ||
702 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS) | 703 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON) |
703 | 704 | ||
704 | /* | 705 | /* |
705 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. | 706 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. |
@@ -791,8 +792,14 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, | |||
791 | unmap_mapping_range(mapping, holebegin, holelen, 0); | 792 | unmap_mapping_range(mapping, holebegin, holelen, 0); |
792 | } | 793 | } |
793 | 794 | ||
794 | extern int vmtruncate(struct inode * inode, loff_t offset); | 795 | extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new); |
795 | extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); | 796 | extern int vmtruncate(struct inode *inode, loff_t offset); |
797 | extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end); | ||
798 | |||
799 | int truncate_inode_page(struct address_space *mapping, struct page *page); | ||
800 | int generic_error_remove_page(struct address_space *mapping, struct page *page); | ||
801 | |||
802 | int invalidate_inode_page(struct page *page); | ||
796 | 803 | ||
797 | #ifdef CONFIG_MMU | 804 | #ifdef CONFIG_MMU |
798 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 805 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
@@ -1279,7 +1286,7 @@ int in_gate_area_no_task(unsigned long addr); | |||
1279 | #define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);}) | 1286 | #define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);}) |
1280 | #endif /* __HAVE_ARCH_GATE_AREA */ | 1287 | #endif /* __HAVE_ARCH_GATE_AREA */ |
1281 | 1288 | ||
1282 | int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, | 1289 | int drop_caches_sysctl_handler(struct ctl_table *, int, |
1283 | void __user *, size_t *, loff_t *); | 1290 | void __user *, size_t *, loff_t *); |
1284 | unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, | 1291 | unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, |
1285 | unsigned long lru_pages); | 1292 | unsigned long lru_pages); |
@@ -1308,5 +1315,12 @@ void vmemmap_populate_print_last(void); | |||
1308 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, | 1315 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, |
1309 | size_t size); | 1316 | size_t size); |
1310 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); | 1317 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); |
1318 | |||
1319 | extern void memory_failure(unsigned long pfn, int trapno); | ||
1320 | extern int __memory_failure(unsigned long pfn, int trapno, int ref); | ||
1321 | extern int sysctl_memory_failure_early_kill; | ||
1322 | extern int sysctl_memory_failure_recovery; | ||
1323 | extern atomic_long_t mce_bad_pages; | ||
1324 | |||
1311 | #endif /* __KERNEL__ */ | 1325 | #endif /* __KERNEL__ */ |
1312 | #endif /* _LINUX_MM_H */ | 1326 | #endif /* _LINUX_MM_H */ |