OSDN Git Service

fs/proc/vmcore.c: use new typedef vm_fault_t
[uclinux-h8/linux.git] / mm / mmap.c
index 17bbf4d..5f2b2b1 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1796,11 +1796,12 @@ out:
 
        vm_stat_account(mm, vm_flags, len >> PAGE_SHIFT);
        if (vm_flags & VM_LOCKED) {
-               if (!((vm_flags & VM_SPECIAL) || is_vm_hugetlb_page(vma) ||
-                                       vma == get_gate_vma(current->mm)))
-                       mm->locked_vm += (len >> PAGE_SHIFT);
-               else
+               if ((vm_flags & VM_SPECIAL) || vma_is_dax(vma) ||
+                                       is_vm_hugetlb_page(vma) ||
+                                       vma == get_gate_vma(current->mm))
                        vma->vm_flags &= VM_LOCKED_CLEAR_MASK;
+               else
+                       mm->locked_vm += (len >> PAGE_SHIFT);
        }
 
        if (file)
@@ -3062,9 +3063,7 @@ void exit_mmap(struct mm_struct *mm)
                 * which clears VM_LOCKED, otherwise the oom reaper cannot
                 * reliably test it.
                 */
-               mutex_lock(&oom_lock);
-               __oom_reap_task_mm(mm);
-               mutex_unlock(&oom_lock);
+               (void)__oom_reap_task_mm(mm);
 
                set_bit(MMF_OOM_SKIP, &mm->flags);
                down_write(&mm->mmap_sem);