mm/hwpoison: fix wrong num_poisoned_pages accounting
authorMinchan Kim <minchan@kernel.org>
Thu, 28 Apr 2016 23:18:44 +0000 (16:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Apr 2016 02:34:04 +0000 (19:34 -0700)
commitd7e69488bd04de165667f6bc741c1c0ec6042ab9
treeb0e9a47dee4929026faac9d46ab69e4b2b03d522
parentb06bad17c7435b600a1d7a35b56eff25e1d3dbc0
mm/hwpoison: fix wrong num_poisoned_pages accounting

Currently, migration code increses num_poisoned_pages on *failed*
migration page as well as successfully migrated one at the trial of
memory-failure.  It will make the stat wrong.  As well, it marks the
page as PG_HWPoison even if the migration trial failed.  It would mean
we cannot recover the corrupted page using memory-failure facility.

This patches fixes it.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c
This page took 0.026098 seconds and 5 git commands to generate.