mm, oom: remove statically defined arch functions of same name
[firefly-linux-kernel-4.4.55.git] / arch / x86 / mm / fault.c
index 7a529cbab7ad1dd96d70cdc323f6943c9219b8f7..027088f2f7dd9b6b836abfe410088579106a7324 100644 (file)
@@ -803,20 +803,6 @@ bad_area_access_error(struct pt_regs *regs, unsigned long error_code,
        __bad_area(regs, error_code, address, SEGV_ACCERR);
 }
 
-/* TODO: fixup for "mm-invoke-oom-killer-from-page-fault.patch" */
-static void
-out_of_memory(struct pt_regs *regs, unsigned long error_code,
-             unsigned long address)
-{
-       /*
-        * We ran out of memory, call the OOM killer, and return the userspace
-        * (which will retry the fault, or kill us if we got oom-killed):
-        */
-       up_read(&current->mm->mmap_sem);
-
-       pagefault_out_of_memory();
-}
-
 static void
 do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
          unsigned int fault)
@@ -879,7 +865,14 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code,
                        return 1;
                }
 
-               out_of_memory(regs, error_code, address);
+               up_read(&current->mm->mmap_sem);
+
+               /*
+                * We ran out of memory, call the OOM killer, and return the
+                * userspace (which will retry the fault, or kill us if we got
+                * oom-killed):
+                */
+               pagefault_out_of_memory();
        } else {
                if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
                             VM_FAULT_HWPOISON_LARGE))