aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Dufour <[email protected]>2015-11-05 18:49:24 -0800
committerLinus Torvalds <[email protected]>2015-11-05 19:34:48 -0800
commit5d3875a01eeafef7ef0b73a99462cb9bd55e8485 (patch)
treeba7a704d412b9843025b932bc1f52280dc903f8e
parent326c2597a3b93b8a89e0c3a2b41fd9971d095a97 (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 <[email protected]> Reviewed-by: Aneesh Kumar K.V <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--fs/proc/task_mmu.c14
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,
set_pte_at(vma->vm_mm, addr, pte, ptent);
}
}
+#else
+static inline void clear_soft_dirty(struct vm_area_struct *vma,
+ unsigned long addr, pte_t *pte)
+{
+}
+#endif
+#if defined(CONFIG_MEM_SOFT_DIRTY) && defined(CONFIG_TRANSPARENT_HUGEPAGE)
static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma,
unsigned long addr, pmd_t *pmdp)
{
@@ -815,14 +822,7 @@ static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma,
set_pmd_at(vma->vm_mm, addr, pmdp, pmd);
}
-
#else
-
-static inline void clear_soft_dirty(struct vm_area_struct *vma,
- unsigned long addr, pte_t *pte)
-{
-}
-
static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma,
unsigned long addr, pmd_t *pmdp)
{