diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/huge_mm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index 1b921299abc4..f56cacb4fec3 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -113,6 +113,18 @@ extern void __vma_adjust_trans_huge(struct vm_area_struct *vma, | |||
113 | unsigned long start, | 113 | unsigned long start, |
114 | unsigned long end, | 114 | unsigned long end, |
115 | long adjust_next); | 115 | long adjust_next); |
116 | extern int __pmd_trans_huge_lock(pmd_t *pmd, | ||
117 | struct vm_area_struct *vma); | ||
118 | /* mmap_sem must be held on entry */ | ||
119 | static inline int pmd_trans_huge_lock(pmd_t *pmd, | ||
120 | struct vm_area_struct *vma) | ||
121 | { | ||
122 | VM_BUG_ON(!rwsem_is_locked(&vma->vm_mm->mmap_sem)); | ||
123 | if (pmd_trans_huge(*pmd)) | ||
124 | return __pmd_trans_huge_lock(pmd, vma); | ||
125 | else | ||
126 | return 0; | ||
127 | } | ||
116 | static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, | 128 | static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, |
117 | unsigned long start, | 129 | unsigned long start, |
118 | unsigned long end, | 130 | unsigned long end, |
@@ -176,6 +188,11 @@ static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, | |||
176 | long adjust_next) | 188 | long adjust_next) |
177 | { | 189 | { |
178 | } | 190 | } |
191 | static inline int pmd_trans_huge_lock(pmd_t *pmd, | ||
192 | struct vm_area_struct *vma) | ||
193 | { | ||
194 | return 0; | ||
195 | } | ||
179 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | 196 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ |
180 | 197 | ||
181 | #endif /* _LINUX_HUGE_MM_H */ | 198 | #endif /* _LINUX_HUGE_MM_H */ |