From: Souptick Joarder <jrdr.linux@gmail.com>
To: akpm@linux-foundation.org, willy@infradead.org,
rcampbell@nvidia.com, jglisse@redhat.com, mhocko@suse.com,
aneesh.kumar@linux.ibm.com, peterz@infradead.org,
airlied@redhat.com, thellstrom@vmware.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Souptick Joarder <jrdr.linux@gmail.com>
Subject: [PATCH] mm/memory.c: Convert to use vmf_error()
Date: Fri, 6 Sep 2019 00:13:00 +0530 [thread overview]
Message-ID: <1567708980-8804-1-git-send-email-jrdr.linux@gmail.com> (raw)
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
next reply other threads:[~2019-09-05 18:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 18:43 Souptick Joarder [this message]
2019-09-05 18:59 ` [PATCH] mm/memory.c: Convert to use vmf_error() Matthew Wilcox
2019-09-06 12:24 ` Souptick Joarder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1567708980-8804-1-git-send-email-jrdr.linux@gmail.com \
--to=jrdr.linux@gmail.com \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=peterz@infradead.org \
--cc=rcampbell@nvidia.com \
--cc=thellstrom@vmware.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).