]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
fs/proc/vmcore.c: Convert to use vmf_error()
authorSouptick Joarder <jrdr.linux@gmail.com>
Tue, 30 Oct 2018 22:04:35 +0000 (15:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Oct 2018 15:54:12 +0000 (08:54 -0700)
This code can be replaced with vmf_error() inline function.

Link: http://lkml.kernel.org/r/20180918145945.GA11392@jordon-HP-15-Notebook-PC
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Matthew Wilcox <willy@infradead.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/vmcore.c

index 91ae16fbd7d591c3bf10e7d40d16a506d60bdff9..0377a104495b5837227e4a150f95e7b491929581 100644 (file)
@@ -423,7 +423,7 @@ static vm_fault_t mmap_vmcore_fault(struct vm_fault *vmf)
                if (rc < 0) {
                        unlock_page(page);
                        put_page(page);
-                       return (rc == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS;
+                       return vmf_error(rc);
                }
                SetPageUptodate(page);
        }