linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Souptick Joarder <jrdr.linux@gmail.com>
To: adobriyan@gmail.com, ganeshgr@chelsio.com,
	rahul.lakkireddy@chelsio.com, davem@davemloft.net,
	akpm@linux-foundation.org, arnd@arndb.de, willy@infradead.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH] fs/proc/vmcore.c: Convert to use vmf_error()
Date: Tue, 18 Sep 2018 20:29:46 +0530	[thread overview]
Message-ID: <20180918145945.GA11392@jordon-HP-15-Notebook-PC> (raw)

This code can be replaced with vmf_error() inline function.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 fs/proc/vmcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index cbde728..89c6f94 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -401,7 +401,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);
 	}
-- 
1.9.1


             reply	other threads:[~2018-09-18 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18 14:59 Souptick Joarder [this message]
2018-09-18 21:38 ` Matthew Wilcox

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=20180918145945.GA11392@jordon-HP-15-Notebook-PC \
    --to=jrdr.linux@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=ganeshgr@chelsio.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=willy@infradead.org \
    --subject='Re: [PATCH] fs/proc/vmcore.c: Convert to use vmf_error()' \
    /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

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).