Whamcloud - gitweb
A mostly-fix for "mknod /mnt/lustre/foofo p". It doesn't fail outright
[fs/lustre-release.git] / lustre / mds / mds_reint.c
index d6761cb..f41a621 100644 (file)
@@ -234,7 +234,7 @@ static int mds_reint_create(struct mds_update_record *rec, int offset,
         if (offset)
                 offset = 1;
 
-        if (strcmp(req->rq_export->export_obd->obd_type->typ_name, "mds") != 0)
+        if (strcmp(req->rq_export->exp_obd->obd_type->typ_name, "mds") != 0)
                 LBUG();
 
         de = mds_fid2dentry(mds, rec->ur_fid1, NULL);
@@ -342,7 +342,7 @@ static int mds_reint_create(struct mds_update_record *rec, int offset,
                 break;
         }
         default:
-                CERROR("bad file type %d for create of %s\n",type,rec->ur_name);
+                CERROR("bad file type %o for create of %s\n",type,rec->ur_name);
                 GOTO(out_create_dchild, rc = -EINVAL);
         }
 
@@ -485,7 +485,7 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset,
         case S_IFDIR:
                 handle = mds_fs_start(mds, dir, MDS_FSOP_RMDIR);
                 if (!handle)
-                        GOTO(out_unlink_dchild, rc = PTR_ERR(handle));
+                        GOTO(out_unlink_cancel, rc = PTR_ERR(handle));
                 rc = vfs_rmdir(dir, dchild);
                 break;
         case S_IFREG:
@@ -502,7 +502,7 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset,
         default:
                 handle = mds_fs_start(mds, dir, MDS_FSOP_UNLINK);
                 if (!handle)
-                        GOTO(out_unlink_dchild, rc = PTR_ERR(handle));
+                        GOTO(out_unlink_cancel, rc = PTR_ERR(handle));
                 rc = vfs_unlink(dir, dchild);
                 break;
         }
@@ -518,12 +518,13 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset,
 
         EXIT;
 
-out_unlink_dchild:
-        l_dput(dchild);
+ out_unlink_cancel:
         ldlm_lock_decref(&child_lockh, LCK_EX);
         rc = ldlm_cli_cancel(&child_lockh);
         if (rc < 0)
                 CERROR("failed to cancel child inode lock ino\n"); 
+out_unlink_dchild:
+        l_dput(dchild);
 out_unlink:
         up(&dir->i_sem);
         ldlm_lock_decref(&lockh, lock_mode);