|
@@ -45,12 +45,9 @@ static int hwpoison_inject(void *data, u64 val)
|
|
/*
|
|
/*
|
|
* do a racy check with elevated page count, to make sure PG_hwpoison
|
|
* do a racy check with elevated page count, to make sure PG_hwpoison
|
|
* will only be set for the targeted owner (or on a free page).
|
|
* will only be set for the targeted owner (or on a free page).
|
|
- * We temporarily take page lock for try_get_mem_cgroup_from_page().
|
|
|
|
* memory_failure() will redo the check reliably inside page lock.
|
|
* memory_failure() will redo the check reliably inside page lock.
|
|
*/
|
|
*/
|
|
- lock_page(hpage);
|
|
|
|
err = hwpoison_filter(hpage);
|
|
err = hwpoison_filter(hpage);
|
|
- unlock_page(hpage);
|
|
|
|
if (err)
|
|
if (err)
|
|
goto put_out;
|
|
goto put_out;
|
|
|
|
|
|
@@ -126,7 +123,7 @@ static int pfn_inject_init(void)
|
|
if (!dentry)
|
|
if (!dentry)
|
|
goto fail;
|
|
goto fail;
|
|
|
|
|
|
-#ifdef CONFIG_MEMCG_SWAP
|
|
|
|
|
|
+#ifdef CONFIG_MEMCG
|
|
dentry = debugfs_create_u64("corrupt-filter-memcg", 0600,
|
|
dentry = debugfs_create_u64("corrupt-filter-memcg", 0600,
|
|
hwpoison_dir, &hwpoison_filter_memcg);
|
|
hwpoison_dir, &hwpoison_filter_memcg);
|
|
if (!dentry)
|
|
if (!dentry)
|