This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / mm / mlock.c
index 0cf446b..a9e3716 100644 (file)
@@ -32,10 +32,13 @@ static int mlock_fixup(struct vm_area_struct * vma,
                        goto out;
                }
        }
-       
-       spin_lock(&mm->page_table_lock);
+
+       /*
+        * vm_flags is protected by the mmap_sem held in write mode.
+        * It's okay if try_to_unmap_one unmaps a page just after we
+        * set VM_LOCKED, make_pages_present below will bring it back.
+        */
        vma->vm_flags = newflags;
-       spin_unlock(&mm->page_table_lock);
 
        /*
         * Keep track of amount of locked VM.