]> Pileus Git - ~andy/linux/blobdiff - include/asm-generic/pgtable.h
powerpc/thp: Fix crash on mremap
[~andy/linux] / include / asm-generic / pgtable.h
index db09234589409760b91cb9e696472a3e828476f9..8e4f41d9af4d47279e13a33edd317ce5de32e451 100644 (file)
@@ -558,6 +558,18 @@ static inline pmd_t pmd_read_atomic(pmd_t *pmdp)
 }
 #endif
 
+#ifndef pmd_move_must_withdraw
+static inline int pmd_move_must_withdraw(spinlock_t *new_pmd_ptl,
+                                        spinlock_t *old_pmd_ptl)
+{
+       /*
+        * With split pmd lock we also need to move preallocated
+        * PTE page table if new_pmd is on different PMD page table.
+        */
+       return new_pmd_ptl != old_pmd_ptl;
+}
+#endif
+
 /*
  * This function is meant to be used by sites walking pagetables with
  * the mmap_sem hold in read mode to protect against MADV_DONTNEED and