Whamcloud - gitweb
LU-12514 target: move server mount code to target layer
[fs/lustre-release.git] / lustre / target / tgt_main.c
index 76ccece..b40d466 100644 (file)
@@ -824,6 +824,12 @@ int tgt_mod_init(void)
        if (result != 0)
                RETURN(result);
 
+       result = lustre_tgt_register_fs();
+       if (result != 0) {
+               lu_kmem_fini(tgt_caches);
+               RETURN(result);
+       }
+
        tgt_page_to_corrupt = alloc_page(GFP_KERNEL);
 
        tgt_key_init_generic(&tgt_thread_key, NULL);
@@ -848,6 +854,8 @@ void tgt_mod_exit(void)
        lu_context_key_degister(&tgt_session_key);
        update_info_fini();
 
+       lustre_tgt_unregister_fs();
+
        lu_kmem_fini(tgt_caches);
 }