Whamcloud - gitweb
Branch: HEAD
[fs/lustre-release.git] / lustre / llite / llite_lib.c
index d0ca61d..f006c38 100644 (file)
@@ -409,12 +409,13 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov,
         if (err)
                 GOTO(out_lmv, err);
 
+        /*connect GSS*/
         err = lustre_init_crypto(sb, gkc, data, async);
         if (err) {
                 CERROR("Could not connect to GSS err %d\n", err);
                 err = 0;
         }
-        /*connect GSS*/
+        
         err = lustre_init_root_inode(sb);
         if (err)
                 GOTO(out_gks, err);
@@ -466,10 +467,10 @@ void lustre_common_put_super(struct super_block *sb)
         ll_gns_del_timer(sbi);
         ll_close_thread_stop(sbi->ll_lcq);
 
-        lustre_destroy_crypto(sb);
-
         list_del(&sbi->ll_conn_chain);
         obd_disconnect(sbi->ll_dt_exp, 0);
+        
+        lustre_destroy_crypto(sb);
 
         lprocfs_unregister_mountpoint(sbi);
         if (sbi->ll_proc_root) {
@@ -876,6 +877,7 @@ static int lustre_process_profile(struct super_block *sb,
         cfg.cfg_instance = sbi->ll_instance;
         cfg.cfg_uuid = sbi->ll_sb_uuid;
         cfg.cfg_local_nid = lmd->lmd_local_nid;
+        cfg.cfg_flags |= CFG_MODIFY_UUID_FL;
         err = lustre_process_log(lmd, lmd->lmd_profile, &cfg, 0);
         if (err < 0) {
                 CERROR("Unable to process log: %s\n", lmd->lmd_profile);
@@ -942,6 +944,7 @@ static int lustre_clean_profile(struct ll_sb_info *sbi, int force_umount)
                 
         }
         if (sbi->ll_instance != NULL) {
+                cfg.cfg_flags |= CFG_MODIFY_UUID_FL;
                 cfg.cfg_instance = sbi->ll_instance;
                 cfg.cfg_uuid = sbi->ll_sb_uuid;
 
@@ -1189,7 +1192,10 @@ void ll_clear_inode(struct inode *inode)
                                (struct lov_stripe_md **) &lli->lli_mea);
                 lli->lli_mea = NULL;
         }
+
+        LASSERT(sbi->ll_crypto_info != NULL);
         ll_crypto_destroy_inode_key(inode);
+
         if (lli->lli_symlink_name) {
                 OBD_FREE(lli->lli_symlink_name,
                          strlen(lli->lli_symlink_name) + 1);
@@ -1212,8 +1218,8 @@ void ll_clear_inode(struct inode *inode)
                 capa_put(ocapa);
 
         LASSERT(!mapping_has_pages(inode->i_mapping));
-
         lli->lli_inode_magic = LLI_INODE_DEAD;
+        
         EXIT;
 }