Whamcloud - gitweb
- obd_disconnect(sbi->ll_dt_exp) clears namespace and lets inodes go, we
authoralex <alex>
Fri, 16 Sep 2005 22:23:31 +0000 (22:23 +0000)
committeralex <alex>
Fri, 16 Sep 2005 22:23:31 +0000 (22:23 +0000)
  shouldn't release crypto subsystem before, because it's used in ll_clear_inode()

lustre/llite/llite_gs.c
lustre/llite/llite_lib.c

index 8b145e4..d1b0ba5 100644 (file)
@@ -749,7 +749,9 @@ int lustre_destroy_crypto(struct super_block *sb)
                 obd_disconnect(llci->ll_gt_exp, 0);
  
         ll_unregister_cops(llci);
-        OBD_FREE(llci, sizeof(*llci)); 
+        OBD_FREE(llci, sizeof(*llci));
+        ll_s2sbi(sb)->ll_crypto_info = NULL;
+
         RETURN(0);
 }
 
index d0ca61d..bad3fb3 100644 (file)
@@ -466,10 +466,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) {
@@ -1189,7 +1189,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 +1215,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;
 }