HWPOISON: add memory cgroup filter
[linux-2.6.git] / mm / hwpoison-inject.c
index c4dfd89..c838735 100644 (file)
@@ -112,6 +112,13 @@ static int pfn_inject_init(void)
        if (!dentry)
                goto fail;
 
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
+       dentry = debugfs_create_u64("corrupt-filter-memcg", 0600,
+                                   hwpoison_dir, &hwpoison_filter_memcg);
+       if (!dentry)
+               goto fail;
+#endif
+
        return 0;
 fail:
        pfn_inject_exit();