]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - mm/mremap.c
mm: sync vmalloc address space page tables in alloc_vm_area()
[linux-2.6.git] / mm / mremap.c
index 909e1e1e99b1fbe5606888225af1be4acffeaf7a..506fa44403df5cc3215cb69ec2d1098a96bb7919 100644 (file)
@@ -93,7 +93,7 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
                 * and we propagate stale pages into the dst afterward.
                 */
                mapping = vma->vm_file->f_mapping;
-               spin_lock(&mapping->i_mmap_lock);
+               mutex_lock(&mapping->i_mmap_mutex);
        }
 
        /*
@@ -122,7 +122,7 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
        pte_unmap(new_pte - 1);
        pte_unmap_unlock(old_pte - 1, old_ptl);
        if (mapping)
-               spin_unlock(&mapping->i_mmap_lock);
+               mutex_unlock(&mapping->i_mmap_mutex);
        mmu_notifier_invalidate_range_end(vma->vm_mm, old_start, old_end);
 }