diff options
author | Laurent Dufour <ldufour@linux.vnet.ibm.com> | 2015-11-05 21:49:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 22:34:48 -0500 |
commit | 5d3875a01eeafef7ef0b73a99462cb9bd55e8485 (patch) | |
tree | ba7a704d412b9843025b932bc1f52280dc903f8e /fs/proc | |
parent | 326c2597a3b93b8a89e0c3a2b41fd9971d095a97 (diff) |
mm: clear_soft_dirty_pmd() requires THP
Don't build clear_soft_dirty_pmd() if transparent huge pages are not
enabled.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/task_mmu.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index ef44bb474ea2..187b3b5f242e 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -801,7 +801,14 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma, | |||
801 | set_pte_at(vma->vm_mm, addr, pte, ptent); | 801 | set_pte_at(vma->vm_mm, addr, pte, ptent); |
802 | } | 802 | } |
803 | } | 803 | } |
804 | #else | ||
805 | static inline void clear_soft_dirty(struct vm_area_struct *vma, | ||
806 | unsigned long addr, pte_t *pte) | ||
807 | { | ||
808 | } | ||
809 | #endif | ||
804 | 810 | ||
811 | #if defined(CONFIG_MEM_SOFT_DIRTY) && defined(CONFIG_TRANSPARENT_HUGEPAGE) | ||
805 | static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, | 812 | static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, |
806 | unsigned long addr, pmd_t *pmdp) | 813 | unsigned long addr, pmd_t *pmdp) |
807 | { | 814 | { |
@@ -815,14 +822,7 @@ static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, | |||
815 | 822 | ||
816 | set_pmd_at(vma->vm_mm, addr, pmdp, pmd); | 823 | set_pmd_at(vma->vm_mm, addr, pmdp, pmd); |
817 | } | 824 | } |
818 | |||
819 | #else | 825 | #else |
820 | |||
821 | static inline void clear_soft_dirty(struct vm_area_struct *vma, | ||
822 | unsigned long addr, pte_t *pte) | ||
823 | { | ||
824 | } | ||
825 | |||
826 | static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, | 826 | static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, |
827 | unsigned long addr, pmd_t *pmdp) | 827 | unsigned long addr, pmd_t *pmdp) |
828 | { | 828 | { |