From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with ESMTP id C625E6B00E9 for ; Wed, 3 Jun 2009 14:47:11 -0400 (EDT) From: Andi Kleen References: <20090603846.816684333@firstfloor.org> In-Reply-To: <20090603846.816684333@firstfloor.org> Subject: [PATCH] [10/16] HWPOISON: Handle poisoned pages in set_page_dirty() Message-Id: <20090603184644.190E71D0281@basil.firstfloor.org> Date: Wed, 3 Jun 2009 20:46:43 +0200 (CEST) Sender: owner-linux-mm@kvack.org To: akpm@linux-foundation.org, npiggin@suse.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, fengguang.wu@intel.com List-ID: Bail out early in set_page_dirty for poisoned pages. We don't want any of the dirty accounting done or file system write back started, because the page will be just thrown away. Signed-off-by: Andi Kleen --- mm/page-writeback.c | 4 ++++ 1 file changed, 4 insertions(+) Index: linux/mm/page-writeback.c =================================================================== --- linux.orig/mm/page-writeback.c 2009-06-03 19:36:20.000000000 +0200 +++ linux/mm/page-writeback.c 2009-06-03 19:36:23.000000000 +0200 @@ -1304,6 +1304,10 @@ { struct address_space *mapping = page_mapping(page); + if (unlikely(PageHWPoison(page))) { + SetPageDirty(page); + return 0; + } if (likely(mapping)) { int (*spd)(struct page *) = mapping->a_ops->set_page_dirty; #ifdef CONFIG_BLOCK -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org