aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fault-inject.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2008-12-23 05:37:01 -0500
committerPekka Enberg <penberg@cs.helsinki.fi>2008-12-29 04:27:46 -0500
commit773ff60e841461cb1f9374a713ffcda029b8c317 (patch)
treec3691b5a82261a3d2c1861f2913774faac63fa96 /include/linux/fault-inject.h
parent3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff)
SLUB: failslab support
Currently fault-injection capability for SLAB allocator is only available to SLAB. This patch makes it available to SLUB, too. [penberg@cs.helsinki.fi: unify slab and slub implementations] Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Matt Mackall <mpm@selenic.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'include/linux/fault-inject.h')
-rw-r--r--include/linux/fault-inject.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h
index 32368c4f0326..06ca9b21dad2 100644
--- a/include/linux/fault-inject.h
+++ b/include/linux/fault-inject.h
@@ -81,4 +81,13 @@ static inline void cleanup_fault_attr_dentries(struct fault_attr *attr)
81 81
82#endif /* CONFIG_FAULT_INJECTION */ 82#endif /* CONFIG_FAULT_INJECTION */
83 83
84#ifdef CONFIG_FAILSLAB
85extern bool should_failslab(size_t size, gfp_t gfpflags);
86#else
87static inline bool should_failslab(size_t size, gfp_t gfpflags)
88{
89 return false;
90}
91#endif /* CONFIG_FAILSLAB */
92
84#endif /* _LINUX_FAULT_INJECT_H */ 93#endif /* _LINUX_FAULT_INJECT_H */