summaryrefslogtreecommitdiffstats
path: root/mm/hwpoison-inject.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-07 02:22:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-07 02:22:43 +0200
commit02ab343f3b497421793cb4c9725587f9052f7078 (patch)
tree282180d93a177bb61d22190f72c54bc029302b24 /mm/hwpoison-inject.c
parentMerge tag 'iio-for-3.13c' of git://git.kernel.org/pub/scm/linux/kernel/git/ji... (diff)
parentLinux 3.12-rc4 (diff)
downloadlinux-02ab343f3b497421793cb4c9725587f9052f7078.tar.xz
linux-02ab343f3b497421793cb4c9725587f9052f7078.zip
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 afc2daa91c60..4c84678371eb 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);
/*