diff options
author | Christoph Hellwig <hch@lst.de> | 2009-04-13 09:33:09 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-04-24 15:46:04 -0400 |
commit | 9601e3f6336f6ca66929f451b1f66085e68e36e3 (patch) | |
tree | 002308d56cb1947490d691fdf9a8ea74e48d8672 /fs/btrfs/extent_io.c | |
parent | 0d4bf11e5309eff64272a49e1ea55658372abc56 (diff) |
Btrfs: kill btrfs_cache_create
Just use kmem_cache_create directly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 05a1c42e25bf..c33b54029d78 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -17,12 +17,6 @@ | |||
17 | #include "ctree.h" | 17 | #include "ctree.h" |
18 | #include "btrfs_inode.h" | 18 | #include "btrfs_inode.h" |
19 | 19 | ||
20 | /* temporary define until extent_map moves out of btrfs */ | ||
21 | struct kmem_cache *btrfs_cache_create(const char *name, size_t size, | ||
22 | unsigned long extra_flags, | ||
23 | void (*ctor)(void *, struct kmem_cache *, | ||
24 | unsigned long)); | ||
25 | |||
26 | static struct kmem_cache *extent_state_cache; | 20 | static struct kmem_cache *extent_state_cache; |
27 | static struct kmem_cache *extent_buffer_cache; | 21 | static struct kmem_cache *extent_buffer_cache; |
28 | 22 | ||
@@ -58,15 +52,15 @@ struct extent_page_data { | |||
58 | 52 | ||
59 | int __init extent_io_init(void) | 53 | int __init extent_io_init(void) |
60 | { | 54 | { |
61 | extent_state_cache = btrfs_cache_create("extent_state", | 55 | extent_state_cache = kmem_cache_create("extent_state", |
62 | sizeof(struct extent_state), 0, | 56 | sizeof(struct extent_state), 0, |
63 | NULL); | 57 | SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD, NULL); |
64 | if (!extent_state_cache) | 58 | if (!extent_state_cache) |
65 | return -ENOMEM; | 59 | return -ENOMEM; |
66 | 60 | ||
67 | extent_buffer_cache = btrfs_cache_create("extent_buffers", | 61 | extent_buffer_cache = kmem_cache_create("extent_buffers", |
68 | sizeof(struct extent_buffer), 0, | 62 | sizeof(struct extent_buffer), 0, |
69 | NULL); | 63 | SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD, NULL); |
70 | if (!extent_buffer_cache) | 64 | if (!extent_buffer_cache) |
71 | goto free_state_cache; | 65 | goto free_state_cache; |
72 | return 0; | 66 | return 0; |