diff options
Diffstat (limited to 'arch/powerpc/include/asm/pgtable-ppc64.h')
-rw-r--r-- | arch/powerpc/include/asm/pgtable-ppc64.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h index 2b09cd522d33..81576ee0cfb1 100644 --- a/arch/powerpc/include/asm/pgtable-ppc64.h +++ b/arch/powerpc/include/asm/pgtable-ppc64.h | |||
@@ -257,21 +257,20 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm, | |||
257 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | 257 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, |
258 | pte_t *ptep) | 258 | pte_t *ptep) |
259 | { | 259 | { |
260 | unsigned long old; | ||
261 | 260 | ||
262 | if ((pte_val(*ptep) & _PAGE_RW) == 0) | 261 | if ((pte_val(*ptep) & _PAGE_RW) == 0) |
263 | return; | 262 | return; |
264 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); | 263 | |
264 | pte_update(mm, addr, ptep, _PAGE_RW, 0); | ||
265 | } | 265 | } |
266 | 266 | ||
267 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | 267 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, |
268 | unsigned long addr, pte_t *ptep) | 268 | unsigned long addr, pte_t *ptep) |
269 | { | 269 | { |
270 | unsigned long old; | ||
271 | |||
272 | if ((pte_val(*ptep) & _PAGE_RW) == 0) | 270 | if ((pte_val(*ptep) & _PAGE_RW) == 0) |
273 | return; | 271 | return; |
274 | old = pte_update(mm, addr, ptep, _PAGE_RW, 1); | 272 | |
273 | pte_update(mm, addr, ptep, _PAGE_RW, 1); | ||
275 | } | 274 | } |
276 | 275 | ||
277 | /* | 276 | /* |