From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with ESMTP id 245505F0001 for ; Tue, 7 Apr 2009 11:10:29 -0400 (EDT) From: Andi Kleen References: <20090407509.382219156@firstfloor.org> In-Reply-To: <20090407509.382219156@firstfloor.org> Subject: [PATCH] [12/16] POISON: Handle poisoned pages in set_page_dirty() Message-Id: <20090407151009.AFEE01D046D@basil.firstfloor.org> Date: Tue, 7 Apr 2009 17:10:09 +0200 (CEST) Sender: owner-linux-mm@kvack.org To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org 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-04-07 16:39:22.000000000 +0200 +++ linux/mm/page-writeback.c 2009-04-07 16:39:39.000000000 +0200 @@ -1277,6 +1277,10 @@ { struct address_space *mapping = page_mapping(page); + if (unlikely(PagePoison(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