Whamcloud - gitweb
- fixes about lmv_delete_inode().
[fs/lustre-release.git] / lustre / llite / llite_lib.c
index 7542810..ab0f300 100644 (file)
@@ -128,6 +128,7 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
         struct lustre_md md;
         kdev_t devno;
         int err;
+        ENTRY;
 
         obd = class_name2obd(lmv);
         if (!obd) {
@@ -262,7 +263,6 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
 #endif
 
         RETURN(err);
-
 out_root:
         if (root)
                 iput(root);
@@ -272,7 +272,7 @@ out_lmv:
         obd_disconnect(sbi->ll_lmv_exp, 0);
 out:
         lprocfs_unregister_mountpoint(sbi);
-        RETURN(err);
+        return err;
 }
 
 void lustre_common_put_super(struct super_block *sb)
@@ -416,6 +416,7 @@ int ll_fill_super(struct super_block *sb, void *data, int silent)
         }
 
         err = lustre_common_fill_super(sb, lmv, lov);
+        EXIT;
 out:
         if (err)
                 lustre_free_sbi(sb);
@@ -424,7 +425,7 @@ out:
                 OBD_FREE(lmv, strlen(lmv) + 1);
         if (lov)
                 OBD_FREE(lov, strlen(lov) + 1);
-        RETURN(err);
+        return err;
 } /* ll_read_super */
 
 static int lustre_process_log(struct lustre_mount_data *lmd, char *profile,
@@ -525,7 +526,8 @@ static int lustre_process_log(struct lustre_mount_data *lmd, char *profile,
                 CERROR("class_config_process_llog failed: rc = %d\n", rc);
 
         err = obd_disconnect(exp, 0);
-
+        
+        EXIT;
 out_cleanup:
         LCFG_INIT(lcfg, LCFG_CLEANUP, name);
         err = class_process_config(&lcfg);
@@ -559,7 +561,7 @@ out:
         if (rc == 0)
                 rc = err;
 
-        RETURN(rc);
+        return rc;
 }
 
 int lustre_fill_super(struct super_block *sb, void *data, int silent)
@@ -1374,16 +1376,16 @@ void ll_read_inode2(struct inode *inode, void *opaque)
 
 void ll_delete_inode(struct inode *inode)
 {
-        int rc;
-        struct lustre_id id;
         struct ll_sb_info *sbi = ll_i2sbi(inode);
+        struct lustre_id id;
+        int rc;
         ENTRY;
-        
+
         ll_inode2id(&id, inode);
 
-        rc = md_delete_object(sbi->ll_lmv_exp, &id);
+        rc = md_delete_inode(sbi->ll_lmv_exp, &id);
         if (rc) {
-                CERROR("md_delete_object() failed, error %d.\n",
+                CERROR("md_delete_inode() failed, error %d\n", 
                        rc);
         }
 
@@ -1575,10 +1577,10 @@ int ll_get_fid(struct obd_export *exp, struct lustre_id *idp,
 
         valid |= OBD_MD_FID;
         
-        rc = md_getattr_name(exp, idp, filename, strlen(filename) + 1,
+        rc = md_getattr_lock(exp, idp, filename, strlen(filename) + 1,
                              valid, 0, &request);
         if (rc < 0) {
-                CDEBUG(D_INFO, "md_getattr_name failed on %s: rc %d\n",
+                CDEBUG(D_INFO, "md_getattr_lock failed on %s: rc %d\n",
                        filename, rc);
                 return rc;
         }