diff options
Diffstat (limited to 'fs/xfs/xfs_mru_cache.c')
-rw-r--r-- | fs/xfs/xfs_mru_cache.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c index 26d14a1e0e1..afee7eb2432 100644 --- a/fs/xfs/xfs_mru_cache.c +++ b/fs/xfs/xfs_mru_cache.c | |||
@@ -307,15 +307,18 @@ xfs_mru_cache_init(void) | |||
307 | xfs_mru_elem_zone = kmem_zone_init(sizeof(xfs_mru_cache_elem_t), | 307 | xfs_mru_elem_zone = kmem_zone_init(sizeof(xfs_mru_cache_elem_t), |
308 | "xfs_mru_cache_elem"); | 308 | "xfs_mru_cache_elem"); |
309 | if (!xfs_mru_elem_zone) | 309 | if (!xfs_mru_elem_zone) |
310 | return ENOMEM; | 310 | goto out; |
311 | 311 | ||
312 | xfs_mru_reap_wq = create_singlethread_workqueue("xfs_mru_cache"); | 312 | xfs_mru_reap_wq = create_singlethread_workqueue("xfs_mru_cache"); |
313 | if (!xfs_mru_reap_wq) { | 313 | if (!xfs_mru_reap_wq) |
314 | kmem_zone_destroy(xfs_mru_elem_zone); | 314 | goto out_destroy_mru_elem_zone; |
315 | return ENOMEM; | ||
316 | } | ||
317 | 315 | ||
318 | return 0; | 316 | return 0; |
317 | |||
318 | out_destroy_mru_elem_zone: | ||
319 | kmem_zone_destroy(xfs_mru_elem_zone); | ||
320 | out: | ||
321 | return -ENOMEM; | ||
319 | } | 322 | } |
320 | 323 | ||
321 | void | 324 | void |