diff options
Diffstat (limited to 'fs/btrfs/extent_map.c')
-rw-r--r-- | fs/btrfs/extent_map.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 8ad6f8efc5a0..33f7a18dddf7 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c | |||
@@ -10,6 +10,12 @@ | |||
10 | #include <linux/blkdev.h> | 10 | #include <linux/blkdev.h> |
11 | #include "extent_map.h" | 11 | #include "extent_map.h" |
12 | 12 | ||
13 | /* temporary define until extent_map moves out of btrfs */ | ||
14 | struct kmem_cache *btrfs_cache_create(const char *name, size_t size, | ||
15 | unsigned long extra_flags, | ||
16 | void (*ctor)(void *, struct kmem_cache *, | ||
17 | unsigned long)); | ||
18 | |||
13 | static struct kmem_cache *extent_map_cache; | 19 | static struct kmem_cache *extent_map_cache; |
14 | static struct kmem_cache *extent_state_cache; | 20 | static struct kmem_cache *extent_state_cache; |
15 | 21 | ||
@@ -32,14 +38,12 @@ struct tree_entry { | |||
32 | 38 | ||
33 | void __init extent_map_init(void) | 39 | void __init extent_map_init(void) |
34 | { | 40 | { |
35 | extent_map_cache = kmem_cache_create("extent_map", | 41 | extent_map_cache = btrfs_cache_create("extent_map", |
36 | sizeof(struct extent_map), 0, | 42 | sizeof(struct extent_map), |
37 | SLAB_RECLAIM_ACCOUNT | | ||
38 | SLAB_DESTROY_BY_RCU, | 43 | SLAB_DESTROY_BY_RCU, |
39 | NULL); | 44 | NULL); |
40 | extent_state_cache = kmem_cache_create("extent_state", | 45 | extent_state_cache = btrfs_cache_create("extent_state", |
41 | sizeof(struct extent_state), 0, | 46 | sizeof(struct extent_state), |
42 | SLAB_RECLAIM_ACCOUNT | | ||
43 | SLAB_DESTROY_BY_RCU, | 47 | SLAB_DESTROY_BY_RCU, |
44 | NULL); | 48 | NULL); |
45 | } | 49 | } |