diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 255d0f966b9f..0214a812fc0e 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -77,7 +77,6 @@ static const struct file_operations btrfs_dir_file_operations; | |||
77 | static struct extent_io_ops btrfs_extent_io_ops; | 77 | static struct extent_io_ops btrfs_extent_io_ops; |
78 | 78 | ||
79 | static struct kmem_cache *btrfs_inode_cachep; | 79 | static struct kmem_cache *btrfs_inode_cachep; |
80 | static struct kmem_cache *btrfs_delalloc_work_cachep; | ||
81 | struct kmem_cache *btrfs_trans_handle_cachep; | 80 | struct kmem_cache *btrfs_trans_handle_cachep; |
82 | struct kmem_cache *btrfs_transaction_cachep; | 81 | struct kmem_cache *btrfs_transaction_cachep; |
83 | struct kmem_cache *btrfs_path_cachep; | 82 | struct kmem_cache *btrfs_path_cachep; |
@@ -9159,8 +9158,6 @@ void btrfs_destroy_cachep(void) | |||
9159 | kmem_cache_destroy(btrfs_path_cachep); | 9158 | kmem_cache_destroy(btrfs_path_cachep); |
9160 | if (btrfs_free_space_cachep) | 9159 | if (btrfs_free_space_cachep) |
9161 | kmem_cache_destroy(btrfs_free_space_cachep); | 9160 | kmem_cache_destroy(btrfs_free_space_cachep); |
9162 | if (btrfs_delalloc_work_cachep) | ||
9163 | kmem_cache_destroy(btrfs_delalloc_work_cachep); | ||
9164 | } | 9161 | } |
9165 | 9162 | ||
9166 | int btrfs_init_cachep(void) | 9163 | int btrfs_init_cachep(void) |
@@ -9195,13 +9192,6 @@ int btrfs_init_cachep(void) | |||
9195 | if (!btrfs_free_space_cachep) | 9192 | if (!btrfs_free_space_cachep) |
9196 | goto fail; | 9193 | goto fail; |
9197 | 9194 | ||
9198 | btrfs_delalloc_work_cachep = kmem_cache_create("btrfs_delalloc_work", | ||
9199 | sizeof(struct btrfs_delalloc_work), 0, | ||
9200 | SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD, | ||
9201 | NULL); | ||
9202 | if (!btrfs_delalloc_work_cachep) | ||
9203 | goto fail; | ||
9204 | |||
9205 | return 0; | 9195 | return 0; |
9206 | fail: | 9196 | fail: |
9207 | btrfs_destroy_cachep(); | 9197 | btrfs_destroy_cachep(); |
@@ -9446,7 +9436,7 @@ struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode, | |||
9446 | { | 9436 | { |
9447 | struct btrfs_delalloc_work *work; | 9437 | struct btrfs_delalloc_work *work; |
9448 | 9438 | ||
9449 | work = kmem_cache_zalloc(btrfs_delalloc_work_cachep, GFP_NOFS); | 9439 | work = kmalloc(sizeof(*work), GFP_NOFS); |
9450 | if (!work) | 9440 | if (!work) |
9451 | return NULL; | 9441 | return NULL; |
9452 | 9442 | ||
@@ -9465,7 +9455,7 @@ struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode, | |||
9465 | void btrfs_wait_and_free_delalloc_work(struct btrfs_delalloc_work *work) | 9455 | void btrfs_wait_and_free_delalloc_work(struct btrfs_delalloc_work *work) |
9466 | { | 9456 | { |
9467 | wait_for_completion(&work->completion); | 9457 | wait_for_completion(&work->completion); |
9468 | kmem_cache_free(btrfs_delalloc_work_cachep, work); | 9458 | kfree(work); |
9469 | } | 9459 | } |
9470 | 9460 | ||
9471 | /* | 9461 | /* |