aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1dbcf8888f14..6e8ecb6e021c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1409,14 +1409,11 @@ static int __init fail_page_alloc_debugfs(void)
1409{ 1409{
1410 mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; 1410 mode_t mode = S_IFREG | S_IRUSR | S_IWUSR;
1411 struct dentry *dir; 1411 struct dentry *dir;
1412 int err;
1413 1412
1414 err = init_fault_attr_dentries(&fail_page_alloc.attr, 1413 dir = fault_create_debugfs_attr("fail_page_alloc", NULL,
1415 "fail_page_alloc"); 1414 &fail_page_alloc.attr);
1416 if (err) 1415 if (IS_ERR(dir))
1417 return err; 1416 return PTR_ERR(dir);
1418
1419 dir = fail_page_alloc.attr.dir;
1420 1417
1421 if (!debugfs_create_bool("ignore-gfp-wait", mode, dir, 1418 if (!debugfs_create_bool("ignore-gfp-wait", mode, dir,
1422 &fail_page_alloc.ignore_gfp_wait)) 1419 &fail_page_alloc.ignore_gfp_wait))
@@ -1430,7 +1427,7 @@ static int __init fail_page_alloc_debugfs(void)
1430 1427
1431 return 0; 1428 return 0;
1432fail: 1429fail:
1433 cleanup_fault_attr_dentries(&fail_page_alloc.attr); 1430 debugfs_remove_recursive(dir);
1434 1431
1435 return -ENOMEM; 1432 return -ENOMEM;
1436} 1433}