linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: [PATCH] memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location
Date: Tue, 4 Aug 2015 20:20:38 +0800	[thread overview]
Message-ID: <20150804202038.0ca2777e@hp> (raw)

Hi Naoya,

This patch just move the comment about swap cache pages' check to the
proper location in 'hwpoison_user_mappings' function.

Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
---
 mm/memory-failure.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 1cf7f29..3253abb 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -945,10 +945,6 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
 	if (!(PageLRU(hpage) || PageHuge(p)))
 		return SWAP_SUCCESS;
 
-	/*
-	 * This check implies we don't kill processes if their pages
-	 * are in the swap cache early. Those are always late kills.
-	 */
 	if (!page_mapped(hpage))
 		return SWAP_SUCCESS;
 
@@ -957,6 +953,10 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
 		return SWAP_FAIL;
 	}
 
+	/*
+	 * This check implies we don't kill processes if their pages
+	 * are in the swap cache early. Those are always late kills.
+	 */
 	if (PageSwapCache(p)) {
 		printk(KERN_ERR
 		       "MCE %#lx: keeping poisoned page in swap cache\n", pfn);
-- 
1.7.10.4



--
thx!
Wang Xiaoqiang

             reply	other threads:[~2015-08-04 12:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 12:20 Wang Xiaoqiang [this message]
2015-08-04 23:05 ` Naoya Horiguchi

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=20150804202038.0ca2777e@hp \
    --to=wangxq10@lzu.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    /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