diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 09:08:05 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 09:08:18 -0400 |
commit | e060c38434b2caa78efe7cedaff4191040b65a15 (patch) | |
tree | 407361230bf6733f63d8e788e4b5e6566ee04818 /include/linux/fault-inject.h | |
parent | 10e4ac572eeffe5317019bd7330b6058a400dfc2 (diff) | |
parent | cc39c6a9bbdebfcf1a7dee64d83bf302bc38d941 (diff) |
Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
Diffstat (limited to 'include/linux/fault-inject.h')
-rw-r--r-- | include/linux/fault-inject.h | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h index 7b64ad40e4ce..c6f996f2abb6 100644 --- a/include/linux/fault-inject.h +++ b/include/linux/fault-inject.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/debugfs.h> | 7 | #include <linux/debugfs.h> |
8 | #include <asm/atomic.h> | 8 | #include <linux/atomic.h> |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * For explanation of the elements of this struct, see | 11 | * For explanation of the elements of this struct, see |
@@ -25,26 +25,6 @@ struct fault_attr { | |||
25 | unsigned long reject_end; | 25 | unsigned long reject_end; |
26 | 26 | ||
27 | unsigned long count; | 27 | unsigned long count; |
28 | |||
29 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS | ||
30 | |||
31 | struct { | ||
32 | struct dentry *dir; | ||
33 | |||
34 | struct dentry *probability_file; | ||
35 | struct dentry *interval_file; | ||
36 | struct dentry *times_file; | ||
37 | struct dentry *space_file; | ||
38 | struct dentry *verbose_file; | ||
39 | struct dentry *task_filter_file; | ||
40 | struct dentry *stacktrace_depth_file; | ||
41 | struct dentry *require_start_file; | ||
42 | struct dentry *require_end_file; | ||
43 | struct dentry *reject_start_file; | ||
44 | struct dentry *reject_end_file; | ||
45 | } dentries; | ||
46 | |||
47 | #endif | ||
48 | }; | 28 | }; |
49 | 29 | ||
50 | #define FAULT_ATTR_INITIALIZER { \ | 30 | #define FAULT_ATTR_INITIALIZER { \ |
@@ -57,24 +37,19 @@ struct fault_attr { | |||
57 | 37 | ||
58 | #define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER | 38 | #define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER |
59 | int setup_fault_attr(struct fault_attr *attr, char *str); | 39 | int setup_fault_attr(struct fault_attr *attr, char *str); |
60 | void should_fail_srandom(unsigned long entropy); | ||
61 | bool should_fail(struct fault_attr *attr, ssize_t size); | 40 | bool should_fail(struct fault_attr *attr, ssize_t size); |
62 | 41 | ||
63 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS | 42 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS |
64 | 43 | ||
65 | int init_fault_attr_dentries(struct fault_attr *attr, const char *name); | 44 | struct dentry *fault_create_debugfs_attr(const char *name, |
66 | void cleanup_fault_attr_dentries(struct fault_attr *attr); | 45 | struct dentry *parent, struct fault_attr *attr); |
67 | 46 | ||
68 | #else /* CONFIG_FAULT_INJECTION_DEBUG_FS */ | 47 | #else /* CONFIG_FAULT_INJECTION_DEBUG_FS */ |
69 | 48 | ||
70 | static inline int init_fault_attr_dentries(struct fault_attr *attr, | 49 | static inline struct dentry *fault_create_debugfs_attr(const char *name, |
71 | const char *name) | 50 | struct dentry *parent, struct fault_attr *attr) |
72 | { | ||
73 | return -ENODEV; | ||
74 | } | ||
75 | |||
76 | static inline void cleanup_fault_attr_dentries(struct fault_attr *attr) | ||
77 | { | 51 | { |
52 | return ERR_PTR(-ENODEV); | ||
78 | } | 53 | } |
79 | 54 | ||
80 | #endif /* CONFIG_FAULT_INJECTION_DEBUG_FS */ | 55 | #endif /* CONFIG_FAULT_INJECTION_DEBUG_FS */ |