lkml.org 
[lkml]   [2019]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/memory.c: Convert to use vmf_error()
Date
Convert to use vmf_error() here.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
mm/memory.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index e2bb51b..1302be32 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1750,13 +1750,10 @@ static vm_fault_t __vm_insert_mixed(struct vm_area_struct *vma,
} else {
return insert_pfn(vma, addr, pfn, pgprot, mkwrite);
}
-
- if (err == -ENOMEM)
- return VM_FAULT_OOM;
- if (err < 0 && err != -EBUSY)
- return VM_FAULT_SIGBUS;
-
- return VM_FAULT_NOPAGE;
+ if (!err || err == -EBUSY)
+ return VM_FAULT_NOPAGE;
+ else
+ return vmf_error(err);
}

vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
--
1.9.1
\
 
 \ /
  Last update: 2019-09-05 20:38    [W:0.044 / U:7.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site