aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 0afa47378211..e2d1fdc9fa6f 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -38,6 +38,7 @@
#include "xfs_pwork.h"
#include "xfs_ag.h"
#include "xfs_btree.h"
+#include "xfs_defer.h"
#include <linux/magic.h>
#include <linux/fs_context.h>
@@ -1972,11 +1973,15 @@ xfs_init_caches(void)
if (error)
goto out_destroy_bmap_free_item_cache;
+ error = xfs_defer_init_item_caches();
+ if (error)
+ goto out_destroy_btree_cur_cache;
+
xfs_da_state_cache = kmem_cache_create("xfs_da_state",
sizeof(struct xfs_da_state),
0, 0, NULL);
if (!xfs_da_state_cache)
- goto out_destroy_btree_cur_cache;
+ goto out_destroy_defer_item_cache;
xfs_ifork_cache = kmem_cache_create("xfs_ifork",
sizeof(struct xfs_ifork),
@@ -2106,6 +2111,8 @@ xfs_init_caches(void)
kmem_cache_destroy(xfs_ifork_cache);
out_destroy_da_state_cache:
kmem_cache_destroy(xfs_da_state_cache);
+ out_destroy_defer_item_cache:
+ xfs_defer_destroy_item_caches();
out_destroy_btree_cur_cache:
xfs_btree_destroy_cur_caches();
out_destroy_bmap_free_item_cache:
@@ -2139,6 +2146,7 @@ xfs_destroy_caches(void)
kmem_cache_destroy(xfs_trans_cache);
kmem_cache_destroy(xfs_ifork_cache);
kmem_cache_destroy(xfs_da_state_cache);
+ xfs_defer_destroy_item_caches();
xfs_btree_destroy_cur_caches();
kmem_cache_destroy(xfs_bmap_free_item_cache);
kmem_cache_destroy(xfs_log_ticket_cache);