diff options
Diffstat (limited to 'mm/failslab.c')
-rw-r--r-- | mm/failslab.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/failslab.c b/mm/failslab.c index 1ce58c201dca..0dd7b8fec71c 100644 --- a/mm/failslab.c +++ b/mm/failslab.c | |||
@@ -34,23 +34,23 @@ __setup("failslab=", setup_failslab); | |||
34 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS | 34 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS |
35 | static int __init failslab_debugfs_init(void) | 35 | static int __init failslab_debugfs_init(void) |
36 | { | 36 | { |
37 | struct dentry *dir; | ||
37 | mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; | 38 | mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; |
38 | int err; | ||
39 | 39 | ||
40 | err = init_fault_attr_dentries(&failslab.attr, "failslab"); | 40 | dir = fault_create_debugfs_attr("failslab", NULL, &failslab.attr); |
41 | if (err) | 41 | if (IS_ERR(dir)) |
42 | return err; | 42 | return PTR_ERR(dir); |
43 | 43 | ||
44 | if (!debugfs_create_bool("ignore-gfp-wait", mode, failslab.attr.dir, | 44 | if (!debugfs_create_bool("ignore-gfp-wait", mode, dir, |
45 | &failslab.ignore_gfp_wait)) | 45 | &failslab.ignore_gfp_wait)) |
46 | goto fail; | 46 | goto fail; |
47 | if (!debugfs_create_bool("cache-filter", mode, failslab.attr.dir, | 47 | if (!debugfs_create_bool("cache-filter", mode, dir, |
48 | &failslab.cache_filter)) | 48 | &failslab.cache_filter)) |
49 | goto fail; | 49 | goto fail; |
50 | 50 | ||
51 | return 0; | 51 | return 0; |
52 | fail: | 52 | fail: |
53 | cleanup_fault_attr_dentries(&failslab.attr); | 53 | debugfs_remove_recursive(dir); |
54 | 54 | ||
55 | return -ENOMEM; | 55 | return -ENOMEM; |
56 | } | 56 | } |