Merge tag 'v3.10.62' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / mm / mlock.c
index 79b7cf7d1bca72cee9babfb60e21a38799c8eba1..3dcea72277be8988ce2df2f185eadb2fc8b05d7a 100644 (file)
@@ -76,6 +76,7 @@ void clear_page_mlock(struct page *page)
  */
 void mlock_vma_page(struct page *page)
 {
+       /* Serialize with page migration */
        BUG_ON(!PageLocked(page));
 
        if (!TestSetPageMlocked(page)) {
@@ -106,6 +107,7 @@ unsigned int munlock_vma_page(struct page *page)
 {
        unsigned int page_mask = 0;
 
+       /* For try_to_munlock() and to serialize with page migration */
        BUG_ON(!PageLocked(page));
 
        if (TestClearPageMlocked(page)) {
@@ -287,7 +289,8 @@ static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev,
 
        pgoff = vma->vm_pgoff + ((start - vma->vm_start) >> PAGE_SHIFT);
        *prev = vma_merge(mm, *prev, start, end, newflags, vma->anon_vma,
-                         vma->vm_file, pgoff, vma_policy(vma));
+                         vma->vm_file, pgoff, vma_policy(vma),
+                         vma_get_anon_name(vma));
        if (*prev) {
                vma = *prev;
                goto success;