diff options
Diffstat (limited to 'include/linux/mm.h')
| -rw-r--r-- | include/linux/mm.h | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3e9e8fec5a41..655094dc9440 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | #include <linux/mmzone.h> | 10 | #include <linux/mmzone.h> |
| 11 | #include <linux/rbtree.h> | 11 | #include <linux/rbtree.h> |
| 12 | #include <linux/prio_tree.h> | 12 | #include <linux/prio_tree.h> |
| 13 | #include <linux/fs.h> | ||
| 14 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
| 15 | #include <linux/debug_locks.h> | 14 | #include <linux/debug_locks.h> |
| 16 | #include <linux/backing-dev.h> | 15 | #include <linux/backing-dev.h> |
| @@ -18,7 +17,9 @@ | |||
| 18 | 17 | ||
| 19 | struct mempolicy; | 18 | struct mempolicy; |
| 20 | struct anon_vma; | 19 | struct anon_vma; |
| 20 | struct file_ra_state; | ||
| 21 | struct user_struct; | 21 | struct user_struct; |
| 22 | struct writeback_control; | ||
| 22 | 23 | ||
| 23 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ | 24 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ |
| 24 | extern unsigned long max_mapnr; | 25 | extern unsigned long max_mapnr; |
| @@ -861,38 +862,7 @@ struct shrinker { | |||
| 861 | extern void register_shrinker(struct shrinker *); | 862 | extern void register_shrinker(struct shrinker *); |
| 862 | extern void unregister_shrinker(struct shrinker *); | 863 | extern void unregister_shrinker(struct shrinker *); |
| 863 | 864 | ||
| 864 | /* | 865 | int vma_wants_writenotify(struct vm_area_struct *vma); |
| 865 | * Some shared mappigns will want the pages marked read-only | ||
| 866 | * to track write events. If so, we'll downgrade vm_page_prot | ||
| 867 | * to the private version (using protection_map[] without the | ||
| 868 | * VM_SHARED bit). | ||
| 869 | */ | ||
| 870 | static inline int vma_wants_writenotify(struct vm_area_struct *vma) | ||
| 871 | { | ||
| 872 | unsigned int vm_flags = vma->vm_flags; | ||
| 873 | |||
| 874 | /* If it was private or non-writable, the write bit is already clear */ | ||
| 875 | if ((vm_flags & (VM_WRITE|VM_SHARED)) != ((VM_WRITE|VM_SHARED))) | ||
| 876 | return 0; | ||
| 877 | |||
| 878 | /* The backer wishes to know when pages are first written to? */ | ||
| 879 | if (vma->vm_ops && vma->vm_ops->page_mkwrite) | ||
| 880 | return 1; | ||
| 881 | |||
| 882 | /* The open routine did something to the protections already? */ | ||
| 883 | if (pgprot_val(vma->vm_page_prot) != | ||
| 884 | pgprot_val(protection_map[vm_flags & | ||
| 885 | (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)])) | ||
| 886 | return 0; | ||
| 887 | |||
| 888 | /* Specialty mapping? */ | ||
| 889 | if (vm_flags & (VM_PFNMAP|VM_INSERTPAGE)) | ||
| 890 | return 0; | ||
| 891 | |||
| 892 | /* Can the mapping track the dirty pages? */ | ||
| 893 | return vma->vm_file && vma->vm_file->f_mapping && | ||
| 894 | mapping_cap_account_dirty(vma->vm_file->f_mapping); | ||
| 895 | } | ||
| 896 | 866 | ||
| 897 | extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); | 867 | extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); |
| 898 | 868 | ||
