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.h24
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
289extern int is_vmalloc_or_module_addr(const void *x); 289extern int is_vmalloc_or_module_addr(const void *x);
290#else 290#else
291static int is_vmalloc_or_module_addr(const void *x) 291static 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
794extern int vmtruncate(struct inode * inode, loff_t offset); 795extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new);
795extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); 796extern int vmtruncate(struct inode *inode, loff_t offset);
797extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end);
798
799int truncate_inode_page(struct address_space *mapping, struct page *page);
800int generic_error_remove_page(struct address_space *mapping, struct page *page);
801
802int invalidate_inode_page(struct page *page);
796 803
797#ifdef CONFIG_MMU 804#ifdef CONFIG_MMU
798extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, 805extern 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
1282int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, 1289int drop_caches_sysctl_handler(struct ctl_table *, int,
1283 void __user *, size_t *, loff_t *); 1290 void __user *, size_t *, loff_t *);
1284unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, 1291unsigned 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);
1308extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, 1315extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim,
1309 size_t size); 1316 size_t size);
1310extern void refund_locked_memory(struct mm_struct *mm, size_t size); 1317extern void refund_locked_memory(struct mm_struct *mm, size_t size);
1318
1319extern void memory_failure(unsigned long pfn, int trapno);
1320extern int __memory_failure(unsigned long pfn, int trapno, int ref);
1321extern int sysctl_memory_failure_early_kill;
1322extern int sysctl_memory_failure_recovery;
1323extern atomic_long_t mce_bad_pages;
1324
1311#endif /* __KERNEL__ */ 1325#endif /* __KERNEL__ */
1312#endif /* _LINUX_MM_H */ 1326#endif /* _LINUX_MM_H */