[PATCH 14 of 25] bail out gup_fast on freezed pmd

Andrea Arcangeli
2009-11-14T18:10:26Z

Force gup_fast to take the slow path and block if the pmd is freezed, not only
if it's none.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
--- a/arch/x86/mm/gup.c
+++ b/arch/x86/mm/gup.c
@@ -156,7 +156,7 @@ static int gup_pmd_range(pud_t pud, unsi
pmd_t pmd = *pmdp;

next = pmd_addr_end(addr, end);
- if (pmd_none(pmd))
+ if (pmd_none(pmd) || pmd_trans_frozen(pmd))
return 0;
if (unlikely(pmd_large(pmd))) {
if (!gup_huge_pmd(pmd, addr, next, write, pages, nr))