From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with ESMTP id BD07C6B00BF for ; Wed, 27 May 2009 16:12:46 -0400 (EDT) From: Andi Kleen References: <200905271012.668777061@firstfloor.org> In-Reply-To: <200905271012.668777061@firstfloor.org> Subject: [PATCH] [11/16] HWPOISON: Handle poisoned pages in set_page_dirty() Message-Id: <20090527201237.B7A611D028F@basil.firstfloor.org> Date: Wed, 27 May 2009 22:12:37 +0200 (CEST) Sender: owner-linux-mm@kvack.org To: akpm@linux-foundation.org, 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-05-26 22:15:37.000000000 +0200 +++ linux/mm/page-writeback.c 2009-05-27 21:14:21.000000000 +0200 @@ -1277,6 +1277,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