usr/src/uts/common/fs/nfs/nfs3_srv.c
changeset 1146 c3555cdf52c2
parent 254 349581d9fc98
child 1610 3436e82414c8
--- a/usr/src/uts/common/fs/nfs/nfs3_srv.c	Mon Dec 19 10:24:57 2005 -0800
+++ b/usr/src/uts/common/fs/nfs/nfs3_srv.c	Mon Dec 19 12:21:33 2005 -0800
@@ -2400,6 +2400,19 @@
 		}
 		nbl_end_crit(srcvp);
 	}
+	if (error == 0) {
+		char *tmp;
+
+		/* fix the path name for the renamed file */
+		mutex_enter(&srcvp->v_lock);
+		tmp = srcvp->v_path;
+		srcvp->v_path = NULL;
+		mutex_exit(&srcvp->v_lock);
+		vn_setpath(rootdir, tvp, srcvp, args->to.name,
+				strlen(args->to.name));
+		if (tmp != NULL)
+			kmem_free(tmp, strlen(tmp) + 1);
+	}
 	VN_RELE(srcvp);
 	srcvp = NULL;