diff mbox series

fs/dax.c: Use vmf_error() helper

Message ID 1538198237-37466-1-git-send-email-zhongjiang@huawei.com (mailing list archive)
State New, archived
Headers show
Series fs/dax.c: Use vmf_error() helper | expand

Commit Message

zhong jiang Sept. 29, 2018, 5:17 a.m. UTC
These codes can be replaced with new inline vmf_error().

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 fs/dax.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/dax.c b/fs/dax.c
index b68ce48..e732f70 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1311,9 +1311,8 @@  static vm_fault_t dax_fault_return(int error)
 {
 	if (error == 0)
 		return VM_FAULT_NOPAGE;
-	if (error == -ENOMEM)
-		return VM_FAULT_OOM;
-	return VM_FAULT_SIGBUS;
+
+	return vmf_error(error);
 }
 
 /*