]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
HWPOISON: check dirty flag to match against clean page
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Tue, 26 Mar 2013 23:24:16 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:12:01 +0000 (17:12 +1100)
Currently page_action() does not check dirty flag to determine whether the
error page is "clean mlocked/unevictable LRU" page.  This doesn't cause
any misjudgement because we do matching against "dirty mlocked/unevictable
LRU" just before the check.  But in order to make code consistent and/or
to avoid potential regression, we had better check dirty flag explicitly.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Suggested-by: Chen Gong <gong.chen@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c

index df0694c6adefccfafdc18b0ca7926b900f982234..ceb0c7f1932f2e97c18cb1971f5b0593d57172ab 100644 (file)
@@ -785,10 +785,10 @@ static struct page_state {
        { sc|dirty,     sc,             "clean swapcache",      me_swapcache_clean },
 
        { mlock|dirty,  mlock|dirty,    "dirty mlocked LRU",    me_pagecache_dirty },
-       { mlock,        mlock,          "clean mlocked LRU",    me_pagecache_clean },
+       { mlock|dirty,  mlock,          "clean mlocked LRU",    me_pagecache_clean },
 
        { unevict|dirty, unevict|dirty, "dirty unevictable LRU", me_pagecache_dirty },
-       { unevict,      unevict,        "clean unevictable LRU", me_pagecache_clean },
+       { unevict|dirty, unevict,       "clean unevictable LRU", me_pagecache_clean },
 
        { lru|dirty,    lru|dirty,      "dirty LRU",    me_pagecache_dirty },
        { lru|dirty,    lru,            "clean LRU",    me_pagecache_clean },