lkml.org 
[lkml]   [2009]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [11/16] HWPOISON: Handle poisoned pages in set_page_dirty()
Date

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 <ak@linux.intel.com>

---
mm/page-writeback.c | 4 ++++
1 file changed, 4 insertions(+)

Index: linux/mm/page-writeback.c
===================================================================
--- linux.orig/mm/page-writeback.c 2009-05-29 23:32:08.000000000 +0200
+++ linux/mm/page-writeback.c 2009-05-29 23:32:10.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

\
 
 \ /
  Last update: 2009-05-29 23:43    [W:0.071 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site