search for: slab_destroy_by_rcu

Displaying 2 results from an estimated 2 matches for "slab_destroy_by_rcu".

2007 Nov 06
0
[PATCH] check return value in extent map allocation
...:06:04 2007 -0500 @@ -36,16 +36,23 @@ struct tree_entry { #define EXTENT_IOBITS (EXTENT_LOCKED | EXTENT_WRITEBACK) -void __init extent_map_init(void) +int __init extent_map_init(void) { extent_map_cache = btrfs_cache_create("extent_map", sizeof(struct extent_map), SLAB_DESTROY_BY_RCU, NULL); + if (!extent_map_cache) + return -ENOMEM; + extent_state_cache = btrfs_cache_create("extent_state", sizeof(struct extent_state), SLAB_DESTROY_BY_RCU, NULL); + if (!extent_state_cache) + return -ENOMEM; + + return 0; } void __exit exte...
2013 Jan 16
6
[PATCH V2] mm/slab: add a leak decoder callback
...roy_memcg_children(s); @@ -259,6 +260,9 @@ void kmem_cache_destroy(struct kmem_cache *s) if (!s->refcount) { list_del(&s->list); + if (unlikely(decoder)) + s->decoder = decoder; + if (!__kmem_cache_shutdown(s)) { mutex_unlock(&slab_mutex); if (s->flags & SLAB_DESTROY_BY_RCU) @@ -279,8 +283,19 @@ void kmem_cache_destroy(struct kmem_cache *s) } put_online_cpus(); } + +void kmem_cache_destroy(struct kmem_cache *s) +{ + return __kmem_cache_destroy(s, NULL); +} EXPORT_SYMBOL(kmem_cache_destroy); +void kmem_cache_destroy_decoder(struct kmem_cache *s, void (*decoder)...