aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/dlm/dlmfs.c')
-rw-r--r--fs/ocfs2/dlm/dlmfs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
index 7418dc83de1c..1150412758ac 100644
--- a/fs/ocfs2/dlm/dlmfs.c
+++ b/fs/ocfs2/dlm/dlmfs.c
@@ -588,13 +588,17 @@ static int __init init_dlmfs_fs(void)
588 588
589 dlmfs_print_version(); 589 dlmfs_print_version();
590 590
591 status = bdi_init(&dlmfs_backing_dev_info);
592 if (status)
593 return status;
594
591 dlmfs_inode_cache = kmem_cache_create("dlmfs_inode_cache", 595 dlmfs_inode_cache = kmem_cache_create("dlmfs_inode_cache",
592 sizeof(struct dlmfs_inode_private), 596 sizeof(struct dlmfs_inode_private),
593 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| 597 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
594 SLAB_MEM_SPREAD), 598 SLAB_MEM_SPREAD),
595 dlmfs_init_once); 599 dlmfs_init_once);
596 if (!dlmfs_inode_cache) 600 if (!dlmfs_inode_cache)
597 return -ENOMEM; 601 goto bail;
598 cleanup_inode = 1; 602 cleanup_inode = 1;
599 603
600 user_dlm_worker = create_singlethread_workqueue("user_dlm"); 604 user_dlm_worker = create_singlethread_workqueue("user_dlm");
@@ -611,6 +615,7 @@ bail:
611 kmem_cache_destroy(dlmfs_inode_cache); 615 kmem_cache_destroy(dlmfs_inode_cache);
612 if (cleanup_worker) 616 if (cleanup_worker)
613 destroy_workqueue(user_dlm_worker); 617 destroy_workqueue(user_dlm_worker);
618 bdi_destroy(&dlmfs_backing_dev_info);
614 } else 619 } else
615 printk("OCFS2 User DLM kernel interface loaded\n"); 620 printk("OCFS2 User DLM kernel interface loaded\n");
616 return status; 621 return status;
@@ -624,6 +629,8 @@ static void __exit exit_dlmfs_fs(void)
624 destroy_workqueue(user_dlm_worker); 629 destroy_workqueue(user_dlm_worker);
625 630
626 kmem_cache_destroy(dlmfs_inode_cache); 631 kmem_cache_destroy(dlmfs_inode_cache);
632
633 bdi_destroy(&dlmfs_backing_dev_info);
627} 634}
628 635
629MODULE_AUTHOR("Oracle"); 636MODULE_AUTHOR("Oracle");