mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 23:52:40 +00:00
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>
This commit is contained in:
parent
3c92ec8ae9
commit
773ff60e84
6 changed files with 79 additions and 70 deletions
|
@ -81,4 +81,13 @@ static inline void cleanup_fault_attr_dentries(struct fault_attr *attr)
|
|||
|
||||
#endif /* CONFIG_FAULT_INJECTION */
|
||||
|
||||
#ifdef CONFIG_FAILSLAB
|
||||
extern bool should_failslab(size_t size, gfp_t gfpflags);
|
||||
#else
|
||||
static inline bool should_failslab(size_t size, gfp_t gfpflags)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_FAILSLAB */
|
||||
|
||||
#endif /* _LINUX_FAULT_INJECT_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue