Automatic merge of /spare/repo/linux-2.6/.git branch HEAD
[pandora-kernel.git] / mm / rmap.c
index a6203b4..9827409 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -626,7 +626,7 @@ static void try_to_unmap_cluster(unsigned long cursor,
        pgd_t *pgd;
        pud_t *pud;
        pmd_t *pmd;
-       pte_t *pte;
+       pte_t *pte, *original_pte;
        pte_t pteval;
        struct page *page;
        unsigned long address;
@@ -658,7 +658,7 @@ static void try_to_unmap_cluster(unsigned long cursor,
        if (!pmd_present(*pmd))
                goto out_unlock;
 
-       for (pte = pte_offset_map(pmd, address);
+       for (original_pte = pte = pte_offset_map(pmd, address);
                        address < end; pte++, address += PAGE_SIZE) {
 
                if (!pte_present(*pte))
@@ -694,7 +694,7 @@ static void try_to_unmap_cluster(unsigned long cursor,
                (*mapcount)--;
        }
 
-       pte_unmap(pte);
+       pte_unmap(original_pte);
 out_unlock:
        spin_unlock(&mm->page_table_lock);
 }