libata: change ATA_QCFLAG_DMAMAP semantics
[pandora-kernel.git] / mm / memory.c
index eefd5b6..6dd1cd8 100644 (file)
@@ -392,6 +392,7 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_
                        return NULL;
        }
 
+#ifdef CONFIG_DEBUG_VM
        /*
         * Add some anal sanity checks for now. Eventually,
         * we should just do "return pfn_to_page(pfn)", but
@@ -402,6 +403,7 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_
                print_bad_pte(vma, pte, addr);
                return NULL;
        }
+#endif
 
        /*
         * NOTE! We still have PageReserved() pages in the page 
@@ -1036,7 +1038,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
 
                if (is_vm_hugetlb_page(vma)) {
                        i = follow_hugetlb_page(mm, vma, pages, vmas,
-                                               &start, &len, i);
+                                               &start, &len, i, write);
                        continue;
                }
 
@@ -2084,9 +2086,9 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
                count_vm_event(PGMAJFAULT);
        }
 
-       delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
        mark_page_accessed(page);
        lock_page(page);
+       delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
 
        /*
         * Back out if somebody else already faulted in this pte.
@@ -2748,4 +2750,3 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
 
        return buf - old_buf;
 }
-EXPORT_SYMBOL_GPL(access_process_vm);