- init_timer(&ll_capa_timer);
- ll_capa_timer.function = ll_capa_timer_callback;
- rc = ll_capa_thread_start();
- /*
- * XXX normal cleanup is needed here.
- */
- if (rc == 0)
- rc = vvp_global_init();
+ init_timer(&ll_capa_timer);
+ ll_capa_timer.function = ll_capa_timer_callback;
+ rc = ll_capa_thread_start();
+ if (rc != 0)
+ GOTO(out_proc, rc);
+
+ rc = vvp_global_init();
+ if (rc != 0)
+ GOTO(out_capa, rc);
+
+ rc = ll_xattr_init();
+ if (rc != 0)
+ GOTO(out_vvp, rc);
+
+ lustre_register_client_fill_super(ll_fill_super);
+ lustre_register_kill_super_cb(ll_kill_super);
+ lustre_register_client_process_config(ll_process_config);
+
+ RETURN(0);
+
+out_vvp:
+ vvp_global_fini();
+out_capa:
+ del_timer(&ll_capa_timer);
+ ll_capa_thread_stop();
+out_proc:
+ lprocfs_remove(&proc_lustre_fs_root);
+out_cache:
+ if (ll_inode_cachep != NULL)
+ kmem_cache_destroy(ll_inode_cachep);
+
+ if (ll_file_data_slab != NULL)
+ kmem_cache_destroy(ll_file_data_slab);
+
+ if (ll_remote_perm_cachep != NULL)
+ kmem_cache_destroy(ll_remote_perm_cachep);