summaryrefslogtreecommitdiffstats
path: root/mm/hwpoison-inject.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-06 17:22:43 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-06 17:22:43 -0700
commit02ab343f3b497421793cb4c9725587f9052f7078 (patch)
tree282180d93a177bb61d22190f72c54bc029302b24 /mm/hwpoison-inject.c
parenteb3e6ae960562c1b12b3d9c7bc80687e155d78d0 (diff)
parentd0e639c9e06d44e713170031fe05fb60ebe680af (diff)
Merge 3.12-rc4 into staging-next
We want the staging fixes in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/hwpoison-inject.c')
-rw-r--r--mm/hwpoison-inject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c
index afc2daa91c6..4c84678371e 100644
--- a/mm/hwpoison-inject.c
+++ b/mm/hwpoison-inject.c
@@ -20,8 +20,6 @@ static int hwpoison_inject(void *data, u64 val)
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- if (!hwpoison_filter_enable)
- goto inject;
if (!pfn_valid(pfn))
return -ENXIO;
@@ -33,6 +31,9 @@ static int hwpoison_inject(void *data, u64 val)
if (!get_page_unless_zero(hpage))
return 0;
+ if (!hwpoison_filter_enable)
+ goto inject;
+
if (!PageLRU(p) && !PageHuge(p))
shake_page(p, 0);
/*