Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756264AbbHDMUG (ORCPT ); Tue, 4 Aug 2015 08:20:06 -0400 Received: from mail.lzu.cn ([202.201.0.205]:57105 "EHLO lzu.edu.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756020AbbHDMUE (ORCPT ); Tue, 4 Aug 2015 08:20:04 -0400 Date: Tue, 4 Aug 2015 20:20:38 +0800 From: Wang Xiaoqiang To: Naoya Horiguchi Cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: [PATCH] memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location Message-ID: <20150804202038.0ca2777e@hp> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CM-TRANSID: zQDJygD3_d3vrcBVG41nAA--.25674S2 X-Coremail-Antispam: 1UD129KBjvdXoW7GF1kKFy8Xw1kXFW8WFyUJrb_yoWkCrg_Xa yFyF9xCa9YqF92yF13Ga1fArWvg3W0gr4j93Z2yry3AF1kKw17Z3WSyrW5Kr18Xa97uFy3 ur1kZr4xAr1SgjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbTxYjsxI4VWDJwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2vYz4IE04k24VAvwVAKI4IrM2AIxVAIcxkEcVAq07x2 0xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15Mc Ij6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l F7xvr2IYc2Ij64vIr40E4x8a64kEw24lc2xSY4AK67AK6ryUMxAIw28IcxkI7VAKI48JMx C20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAF wI0_JrI_JrWlx4CE17CEb7AF67AKxVWUXVWUAwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20x vE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v2 0xvaj40_Zr0_Wr1UMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI 0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU0oUDPUUUUU== X-CM-SenderInfo: pzdqw5btrqqzl2xovvfxof0/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1414 Lines: 51 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/