Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: avoid leaking caches or refcounts on sysfs error slab: Fix comment on #endif slab: remove GFP_THISNODE clearing from alloc_slabmgmt() slub: Add might_sleep_if() to slab_alloc() SLUB: failslab support slub: Fix incorrect use of loose slab: Update the kmem_cache_create documentation regarding the name parameter slub: make early_kmem_cache_node_alloc void slab: unsigned slabp->inuse cannot be less than 0 slub - fix get_object_page comment SLUB: Replace __builtin_return_address(0) with _RET_IP_. SLUB: cleanup - define macros instead of hardcoded numbers
This commit is contained in:
@@ -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 */
|
||||
|
@@ -253,9 +253,9 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep,
|
||||
* request comes from.
|
||||
*/
|
||||
#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
|
||||
extern void *__kmalloc_track_caller(size_t, gfp_t, void*);
|
||||
extern void *__kmalloc_track_caller(size_t, gfp_t, unsigned long);
|
||||
#define kmalloc_track_caller(size, flags) \
|
||||
__kmalloc_track_caller(size, flags, __builtin_return_address(0))
|
||||
__kmalloc_track_caller(size, flags, _RET_IP_)
|
||||
#else
|
||||
#define kmalloc_track_caller(size, flags) \
|
||||
__kmalloc(size, flags)
|
||||
@@ -271,10 +271,10 @@ extern void *__kmalloc_track_caller(size_t, gfp_t, void*);
|
||||
* allocation request comes from.
|
||||
*/
|
||||
#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
|
||||
extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *);
|
||||
extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, unsigned long);
|
||||
#define kmalloc_node_track_caller(size, flags, node) \
|
||||
__kmalloc_node_track_caller(size, flags, node, \
|
||||
__builtin_return_address(0))
|
||||
_RET_IP_)
|
||||
#else
|
||||
#define kmalloc_node_track_caller(size, flags, node) \
|
||||
__kmalloc_node(size, flags, node)
|
||||
@@ -285,7 +285,7 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *);
|
||||
#define kmalloc_node_track_caller(size, flags, node) \
|
||||
kmalloc_track_caller(size, flags)
|
||||
|
||||
#endif /* DEBUG_SLAB */
|
||||
#endif /* CONFIG_NUMA */
|
||||
|
||||
/*
|
||||
* Shortcuts
|
||||
|
Reference in New Issue
Block a user