mm/filemap.c: use vm_fault error code directly
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 2 Apr 2020 04:04:53 +0000 (21:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 2 Apr 2020 16:35:26 +0000 (09:35 -0700)
Use VM_FAULT_OOM instead of indirecting through vmf_error(-ENOMEM).

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Link: http://lkml.kernel.org/r/20200318140253.6141-2-willy@infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c

index 385826aa73d762d8d1ca1904e9b8fcf73c9558d0..f62aa9569e483509ada5ef47e1d8b23aeebad234 100644 (file)
@@ -2490,7 +2490,7 @@ retry_find:
                if (!page) {
                        if (fpin)
                                goto out_retry;
-                       return vmf_error(-ENOMEM);
+                       return VM_FAULT_OOM;
                }
        }