Index: coda/coda_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/coda/coda_vnops.c,v retrieving revision 1.19 diff -u -r1.19 coda_vnops.c --- coda_vnops.c 1999/08/28 00:40:58 1.19 +++ coda_vnops.c 1999/11/10 00:00:38 @@ -763,8 +763,6 @@ /* upcall decl */ /* locals */ - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return (0); } @@ -1208,14 +1206,6 @@ } #endif } - /* Have to free the previously saved name */ - /* - * This condition is stolen from ufs_makeinode. I have no idea - * why it's here, but what the hey... - */ - if ((cnp->cn_flags & SAVESTART) == 0) { - zfree(namei_zone, cnp->cn_pnbuf); - } return(error); } @@ -1276,9 +1266,6 @@ CODADEBUG(CODA_REMOVE, myprintf(("in remove result %d\n",error)); ) - if ((cnp->cn_flags & SAVESTART) == 0) { - zfree(namei_zone, cnp->cn_pnbuf); - } return(error); } @@ -1332,10 +1319,6 @@ CODADEBUG(CODA_LINK, myprintf(("in link result %d\n",error)); ) - /* Drop the name buffer if we don't need to SAVESTART */ - if ((cnp->cn_flags & SAVESTART) == 0) { - zfree(namei_zone, cnp->cn_pnbuf); - } return(error); } @@ -1502,14 +1485,6 @@ CODADEBUG(CODA_MKDIR, myprintf(("mkdir error %d\n",error));) } - /* Have to free the previously saved name */ - /* - * ufs_mkdir doesn't check for SAVESTART before freeing the - * pathname buffer, but ufs_create does. For the moment, I'll - * follow their lead, but this seems like it is probably - * incorrect. - */ - zfree(namei_zone, cnp->cn_pnbuf); return(error); } @@ -1559,9 +1534,6 @@ CODADEBUG(CODA_RMDIR, myprintf(("in rmdir result %d\n", error)); ) - if ((cnp->cn_flags & SAVESTART) == 0) { - zfree(namei_zone, cnp->cn_pnbuf); - } return(error); } @@ -1624,13 +1596,6 @@ /* Invalidate the parent's attr cache, the modification time has changed */ tdcp->c_flags &= ~C_VATTR; - - /* - * Free the name buffer - */ - if ((cnp->cn_flags & SAVESTART) == 0) { - zfree(namei_zone, cnp->cn_pnbuf); - } exit: CODADEBUG(CODA_SYMLINK, myprintf(("in symlink result %d\n",error)); ) Index: gnu/ext2fs/ext2_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/gnu/ext2fs/ext2_vnops.c,v retrieving revision 1.47 diff -u -r1.47 ext2_vnops.c --- ext2_vnops.c 1999/06/26 02:47:02 1.47 +++ ext2_vnops.c 1999/11/10 00:56:47 @@ -324,22 +324,18 @@ panic("ufs_link: no name"); #endif if (tdvp->v_mount != vp->v_mount) { - VOP_ABORTOP(tdvp, cnp); error = EXDEV; goto out2; } if (tdvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE, p))) { - VOP_ABORTOP(tdvp, cnp); goto out2; } ip = VTOI(vp); if ((nlink_t)ip->i_nlink >= LINK_MAX) { - VOP_ABORTOP(tdvp, cnp); error = EMLINK; goto out1; } if (ip->i_flags & (IMMUTABLE | APPEND)) { - VOP_ABORTOP(tdvp, cnp); error = EPERM; goto out1; } @@ -352,7 +348,6 @@ ip->i_nlink--; ip->i_flag |= IN_CHANGE; } - zfree(namei_zone, cnp->cn_pnbuf); out1: if (tdvp != vp) VOP_UNLOCK(vp, 0, p); @@ -400,14 +395,12 @@ (tvp && (fvp->v_mount != tvp->v_mount))) { error = EXDEV; abortit: - VOP_ABORTOP(tdvp, tcnp); /* XXX, why not in NFS? */ if (tdvp == tvp) vrele(tdvp); else vput(tdvp); if (tvp) vput(tvp); - VOP_ABORTOP(fdvp, fcnp); /* XXX, why not in NFS? */ vrele(fdvp); vrele(fvp); return (error); @@ -441,7 +434,6 @@ } /* Release destination completely. */ - VOP_ABORTOP(tdvp, tcnp); vput(tdvp); vput(tvp); @@ -868,7 +860,6 @@ #ifdef QUOTA if ((error = getinoquota(ip)) || (error = chkiq(ip, 1, ucp, 0))) { - zfree(namei_zone, cnp->cn_pnbuf); UFS_VFREE(tvp, ip->i_number, dmode); vput(tvp); return (error); @@ -880,7 +871,6 @@ #ifdef QUOTA if ((error = getinoquota(ip)) || (error = chkiq(ip, 1, cnp->cn_cred, 0))) { - zfree(namei_zone, cnp->cn_pnbuf); UFS_VFREE(tvp, ip->i_number, dmode); vput(tvp); return (error); @@ -951,7 +941,6 @@ } else *ap->a_vpp = tvp; out: - zfree(namei_zone, cnp->cn_pnbuf); return (error); #undef DIRBLKSIZ #define DIRBLKSIZ DEV_BSIZE @@ -1087,7 +1076,6 @@ error = UFS_VALLOC(dvp, mode, cnp->cn_cred, &tvp); if (error) { - zfree(namei_zone, cnp->cn_pnbuf); return (error); } ip = VTOI(tvp); @@ -1132,7 +1120,6 @@ #ifdef QUOTA if ((error = getinoquota(ip)) || (error = chkiq(ip, 1, ucp, 0))) { - zfree(namei_zone, cnp->cn_pnbuf); UFS_VFREE(tvp, ip->i_number, mode); vput(tvp); return (error); @@ -1144,7 +1131,6 @@ #ifdef QUOTA if ((error = getinoquota(ip)) || (error = chkiq(ip, 1, cnp->cn_cred, 0))) { - zfree(namei_zone, cnp->cn_pnbuf); UFS_VFREE(tvp, ip->i_number, mode); vput(tvp); return (error); @@ -1172,8 +1158,6 @@ if (error) goto bad; - if ((cnp->cn_flags & SAVESTART) == 0) - zfree(namei_zone, cnp->cn_pnbuf); *vpp = tvp; return (0); @@ -1182,7 +1166,6 @@ * Write error occurred trying to update the inode * or the directory so must deallocate the inode. */ - zfree(namei_zone, cnp->cn_pnbuf); ip->i_nlink = 0; ip->i_flag |= IN_CHANGE; vput(tvp); Index: isofs/cd9660/cd9660_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/isofs/cd9660/cd9660_vnops.c,v retrieving revision 1.60 diff -u -r1.60 cd9660_vnops.c --- cd9660_vnops.c 1999/10/11 19:18:43 1.60 +++ cd9660_vnops.c 1999/11/10 00:01:04 @@ -718,8 +718,6 @@ struct componentname *a_cnp; } */ *ap; { - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return (0); } Index: kern/uipc_usrreq.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_usrreq.c,v retrieving revision 1.51 diff -u -r1.51 uipc_usrreq.c --- uipc_usrreq.c 1999/10/11 15:19:11 1.51 +++ uipc_usrreq.c 1999/11/10 00:42:46 @@ -559,7 +559,7 @@ return (error); vp = nd.ni_vp; if (vp != NULL) { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == vp) vrele(nd.ni_dvp); else @@ -572,6 +572,7 @@ vattr.va_mode = (ACCESSPERMS & ~p->p_fd->fd_cmask); VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); vput(nd.ni_dvp); if (error) return (error); Index: kern/vfs_syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v retrieving revision 1.140 diff -u -r1.140 vfs_syscalls.c --- vfs_syscalls.c 1999/11/01 04:57:41 1.140 +++ vfs_syscalls.c 1999/11/10 01:06:30 @@ -1134,18 +1134,15 @@ } if (!error) { VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); - if (whiteout) { + if (whiteout) error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, CREATE); - if (error) - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); - vput(nd.ni_dvp); - } else { + else error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); - vput(nd.ni_dvp); - } + VOP_RELEASEND(nd.ni_dvp, nd.ni_cnd.cn_pnbuf); + vput(nd.ni_dvp); } else { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, nd.ni_cnd.cn_pnbuf); if (nd.ni_dvp == vp) vrele(nd.ni_dvp); else @@ -1184,7 +1181,7 @@ if ((error = namei(&nd)) != 0) return (error); if (nd.ni_vp != NULL) { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == nd.ni_vp) vrele(nd.ni_dvp); else @@ -1197,6 +1194,7 @@ vattr.va_mode = (SCARG(uap, mode) & ALLPERMS) &~ p->p_fd->fd_cmask; VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); vput(nd.ni_dvp); return (error); } @@ -1234,7 +1232,6 @@ error = namei(&nd); if (!error) { if (nd.ni_vp != NULL) { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_vp) vrele(nd.ni_vp); error = EEXIST; @@ -1244,6 +1241,7 @@ VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE); error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); } + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == nd.ni_vp) vrele(nd.ni_dvp); else @@ -1286,7 +1284,7 @@ if ((error = namei(&nd)) != 0) goto out; if (nd.ni_vp) { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == nd.ni_vp) vrele(nd.ni_dvp); else @@ -1299,6 +1297,7 @@ vattr.va_mode = ACCESSPERMS &~ p->p_fd->fd_cmask; VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr, path); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); vput(nd.ni_dvp); ASSERT_VOP_UNLOCKED(nd.ni_dvp, "symlink"); ASSERT_VOP_UNLOCKED(nd.ni_vp, "symlink"); @@ -1328,7 +1327,7 @@ return (error); if (nd.ni_vp != NULLVP || !(nd.ni_cnd.cn_flags & ISWHITEOUT)) { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == nd.ni_vp) vrele(nd.ni_dvp); else @@ -1339,8 +1338,8 @@ } VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); - if ((error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, DELETE)) != 0) - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, DELETE); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); vput(nd.ni_dvp); ASSERT_VOP_UNLOCKED(nd.ni_dvp, "undelete"); ASSERT_VOP_UNLOCKED(nd.ni_vp, "undelete"); @@ -1389,9 +1388,8 @@ if (!error) { VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd); - } else { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); } + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == vp) vrele(nd.ni_dvp); else @@ -2549,7 +2547,6 @@ /* Translate error code for rename("dir1", "dir2/."). */ if (error == EISDIR && fvp->v_type == VDIR) error = EINVAL; - VOP_ABORTOP(fromnd.ni_dvp, &fromnd.ni_cnd); vrele(fromnd.ni_dvp); vrele(fvp); goto out1; @@ -2589,14 +2586,13 @@ error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd, tond.ni_dvp, tond.ni_vp, &tond.ni_cnd); } else { - VOP_ABORTOP(tond.ni_dvp, &tond.ni_cnd); + VOP_RELEASEND(tond.ni_dvp, &tond.ni_cnd); if (tdvp == tvp) vrele(tdvp); else vput(tdvp); if (tvp) vput(tvp); - VOP_ABORTOP(fromnd.ni_dvp, &fromnd.ni_cnd); vrele(fromnd.ni_dvp); vrele(fvp); } @@ -2605,11 +2601,10 @@ ASSERT_VOP_UNLOCKED(fromnd.ni_vp, "rename"); ASSERT_VOP_UNLOCKED(tond.ni_dvp, "rename"); ASSERT_VOP_UNLOCKED(tond.ni_vp, "rename"); - zfree(namei_zone, tond.ni_cnd.cn_pnbuf); out1: if (fromnd.ni_startdir) vrele(fromnd.ni_startdir); - zfree(namei_zone, fromnd.ni_cnd.cn_pnbuf); + VOP_RELEASEND(fromnd.ni_dvp, &fromnd.ni_cnd); if (error == -1) return (0); return (error); @@ -2644,7 +2639,7 @@ return (error); vp = nd.ni_vp; if (vp != NULL) { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == vp) vrele(nd.ni_dvp); else @@ -2657,6 +2652,7 @@ vattr.va_mode = (SCARG(uap, mode) & ACCESSPERMS) &~ p->p_fd->fd_cmask; VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); error = VOP_MKDIR(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); + VOP_RELEASEND(nd.ni_dvp, nd.ni_cnd.cn_pnbuf); vput(nd.ni_dvp); if (!error) vput(nd.ni_vp); @@ -2711,9 +2707,8 @@ VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE); error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); - } else { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); } + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == vp) vrele(nd.ni_dvp); else Index: kern/vfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_vnops.c,v retrieving revision 1.83 diff -u -r1.83 vfs_vnops.c --- vfs_vnops.c 1999/11/08 03:32:15 1.83 +++ vfs_vnops.c 1999/11/10 00:24:51 @@ -100,6 +100,7 @@ VOP_LEASE(ndp->ni_dvp, p, cred, LEASE_WRITE); error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, vap); + VOP_RELEASEND(ndp->ni_dvp, &ndp->ni_cnd); vput(ndp->ni_dvp); if (error) return (error); @@ -108,7 +109,7 @@ fmode &= ~O_TRUNC; vp = ndp->ni_vp; } else { - VOP_ABORTOP(ndp->ni_dvp, &ndp->ni_cnd); + VOP_RELEASEND(ndp->ni_dvp, &ndp->ni_cnd); if (ndp->ni_dvp == ndp->ni_vp) vrele(ndp->ni_dvp); else Index: kern/vnode_if.sh =================================================================== RCS file: /home/ncvs/src/sys/kern/vnode_if.sh,v retrieving revision 1.20 diff -u -r1.20 vnode_if.sh --- vnode_if.sh 1999/09/26 18:31:51 1.20 +++ vnode_if.sh 1999/11/09 21:56:29 @@ -157,6 +157,9 @@ } else { die "No IN/OUT direction for \"$ln\"."; } + # Strip extra 'NOFREE' specs I use in vnode_if.src to track + # which cnp's will not be freed. + $ln =~ s/NOFREE\s+//; if ($ln =~ s/^WILLRELE\s+//) { $rele = 'WILLRELE'; } else { Index: kern/vnode_if.src =================================================================== RCS file: /home/ncvs/src/sys/kern/vnode_if.src,v retrieving revision 1.23 diff -u -r1.23 vnode_if.src --- vnode_if.src 1999/09/26 18:10:59 1.23 +++ vnode_if.src 1999/11/10 00:44:19 @@ -90,7 +90,7 @@ vop_create { IN struct vnode *dvp; OUT struct vnode **vpp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; IN struct vattr *vap; }; @@ -99,7 +99,7 @@ # vop_whiteout { IN struct vnode *dvp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; IN int flags; }; @@ -110,7 +110,7 @@ vop_mknod { IN struct vnode *dvp; OUT WILLRELE struct vnode **vpp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; IN struct vattr *vap; }; @@ -251,7 +251,7 @@ vop_remove { IN struct vnode *dvp; IN struct vnode *vp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; }; # @@ -261,7 +261,7 @@ vop_link { IN struct vnode *tdvp; IN struct vnode *vp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; }; # @@ -273,10 +273,10 @@ vop_rename { IN WILLRELE struct vnode *fdvp; IN WILLRELE struct vnode *fvp; - IN struct componentname *fcnp; + IN NOFREE struct componentname *fcnp; IN WILLRELE struct vnode *tdvp; IN WILLRELE struct vnode *tvp; - IN struct componentname *tcnp; + IN NOFREE struct componentname *tcnp; }; # @@ -286,7 +286,7 @@ vop_mkdir { IN struct vnode *dvp; OUT struct vnode **vpp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; IN struct vattr *vap; }; @@ -297,7 +297,7 @@ vop_rmdir { IN struct vnode *dvp; IN struct vnode *vp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; }; # @@ -311,7 +311,7 @@ vop_symlink { IN struct vnode *dvp; OUT WILLRELE struct vnode **vpp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; IN struct vattr *vap; IN char *target; }; @@ -342,7 +342,7 @@ # vop_abortop { IN struct vnode *dvp; - IN struct componentname *cnp; + IN NOFREE struct componentname *cnp; }; # Index: miscfs/devfs/devfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v retrieving revision 1.83 diff -u -r1.83 devfs_vnops.c --- devfs_vnops.c 1999/11/07 12:01:31 1.83 +++ devfs_vnops.c 1999/11/10 00:27:39 @@ -681,7 +681,6 @@ */ if ((error = devfs_vntodn(dvp, &tdp)) != 0) { abortit: - VOP_ABORTOP(dvp, cnp); return (error); } if ((error = devfs_vntodn(vp, &tp)) != 0) goto abortit; @@ -791,7 +790,6 @@ || (vp->v_tag != tdvp->v_tag) ) { error = EXDEV; abortit: - VOP_ABORTOP(tdvp, cnp); goto out; } @@ -905,14 +903,12 @@ || ((fp->type == DEV_DIR) && (fp->dvm != tdp->dvm ))) { error = EXDEV; abortit: - VOP_ABORTOP(tdvp, tcnp); if (tdvp == tvp) /* eh? */ vrele(tdvp); else vput(tdvp); if (tvp) vput(tvp); - VOP_ABORTOP(fdvp, fcnp); /* XXX, why not in NFS? */ vrele(fdvp); vrele(fvp); return (error); @@ -982,12 +978,10 @@ } /* Release destination completely. */ - VOP_ABORTOP(tdvp, tcnp); vput(tdvp); vput(tvp); /* Delete source. */ - VOP_ABORTOP(fdvp, fcnp); /*XXX*/ vrele(fdvp); vrele(fvp); dev_free_name(fnp); @@ -1237,8 +1231,6 @@ } */ { DBPRINT(("abortop\n")); - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return 0; } #endif /* notyet */ Index: miscfs/procfs/procfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/miscfs/procfs/procfs_vnops.c,v retrieving revision 1.73 diff -u -r1.73 procfs_vnops.c --- procfs_vnops.c 1999/11/07 07:52:02 1.73 +++ procfs_vnops.c 1999/11/10 00:01:45 @@ -402,9 +402,6 @@ struct componentname *a_cnp; } */ *ap; { - - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return (0); } Index: miscfs/union/union_subr.c =================================================================== RCS file: /home/ncvs/src/sys/miscfs/union/union_subr.c,v retrieving revision 1.42 diff -u -r1.42 union_subr.c --- union_subr.c 1999/10/03 12:18:24 1.42 +++ union_subr.c 1999/11/10 01:09:09 @@ -846,8 +846,6 @@ * by namei, some of the work done by lookup and some of * the work done by VOP_LOOKUP when given a CREATE flag. * Conclusion: Horrible. - * - * The pathname buffer will be FREEed by VOP_MKDIR. */ cn->cn_namelen = pathlen; cn->cn_pnbuf = zalloc(namei_zone); @@ -874,8 +872,6 @@ */ if ((error = relookup(dvp, vpp, cn)) != 0) { - zfree(namei_zone, cn->cn_pnbuf); - cn->cn_pnbuf = NULL; vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, cnp->cn_proc); return(error); } @@ -921,7 +917,7 @@ return (error); if (*vpp) { - VOP_ABORTOP(dvp, &cn); + VOP_RELEASEND(dvp, &cn); if (dvp == *vpp) vrele(*vpp); else @@ -946,6 +942,7 @@ VOP_LEASE(dvp, p, cn.cn_cred, LEASE_WRITE); error = VOP_MKDIR(dvp, vpp, &cn, &va); + VOP_RELEASEND(dvp, &cn); /*vput(dvp);*/ return (error); } @@ -976,7 +973,7 @@ return (error); if (wvp) { - VOP_ABORTOP(dvp, &cn); + VOP_RELEASEND(dvp, &cn); if (wvp == dvp) vrele(wvp); else @@ -988,8 +985,7 @@ VOP_LEASE(dvp, p, p->p_ucred, LEASE_WRITE); error = VOP_WHITEOUT(dvp, &cn, CREATE); - if (error) - VOP_ABORTOP(dvp, &cn); + VOP_RELEASEND(dvp, &cn); return (error); } @@ -1059,7 +1055,7 @@ */ if (vp) { vput(un->un_dirvp); - VOP_ABORTOP(un->un_dirvp, &cn); + VOP_RELEASND(un->un_dirvp, &cn); if (vp == un->un_dirvp) vrele(vp); else @@ -1082,6 +1078,7 @@ vap->va_mode = cmode; VOP_LEASE(un->un_dirvp, p, cred, LEASE_WRITE); error = VOP_CREATE(un->un_dirvp, &vp, &cn, vap); + VOP_RELEASND(un->un_dirvp, &cn); vput(un->un_dirvp); if (error) return (error); Index: msdosfs/msdosfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/msdosfs/msdosfs_vnops.c,v retrieving revision 1.90 diff -u -r1.90 msdosfs_vnops.c --- msdosfs_vnops.c 1999/09/20 23:27:57 1.90 +++ msdosfs_vnops.c 1999/11/10 01:10:39 @@ -185,13 +185,10 @@ error = createde(&ndirent, pdep, &dep, cnp); if (error) goto bad; - if ((cnp->cn_flags & SAVESTART) == 0) - zfree(namei_zone, cnp->cn_pnbuf); *ap->a_vpp = DETOV(dep); return (0); bad: - zfree(namei_zone, cnp->cn_pnbuf); return (error); } @@ -215,7 +212,6 @@ break; default: - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return (EINVAL); } /* NOTREACHED */ @@ -906,7 +902,6 @@ struct componentname *a_cnp; } */ *ap; { - VOP_ABORTOP(ap->a_tdvp, ap->a_cnp); return (EOPNOTSUPP); } @@ -1015,14 +1010,12 @@ (tvp && (fvp->v_mount != tvp->v_mount))) { error = EXDEV; abortit: - VOP_ABORTOP(tdvp, tcnp); if (tdvp == tvp) vrele(tdvp); else vput(tdvp); if (tvp) vput(tvp); - VOP_ABORTOP(fdvp, fcnp); vrele(fdvp); vrele(fvp); return (error); @@ -1428,7 +1421,6 @@ bad: clusterfree(pmp, newcluster, NULL); bad2: - zfree(namei_zone, cnp->cn_pnbuf); return (error); } @@ -1504,8 +1496,6 @@ char *a_target; } */ *ap; { - zfree(namei_zone, ap->a_cnp->cn_pnbuf); - /* VOP_ABORTOP(ap->a_dvp, ap->a_cnp); ??? */ return (EOPNOTSUPP); } @@ -1783,8 +1773,6 @@ struct componentname *a_cnp; } */ *ap; { - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return (0); } Index: nfs/nfs_node.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_node.c,v retrieving revision 1.32 diff -u -r1.32 nfs_node.c --- nfs_node.c 1999/08/28 00:49:57 1.32 +++ nfs_node.c 1999/11/10 00:03:01 @@ -398,8 +398,5 @@ struct componentname *a_cnp; } */ *ap; { - - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return (0); } Index: nfs/nfs_serv.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_serv.c,v retrieving revision 1.86 diff -u -r1.86 nfs_serv.c --- nfs_serv.c 1999/09/29 17:14:58 1.86 +++ nfs_serv.c 1999/11/10 01:20:07 @@ -61,13 +61,6 @@ * and note that nfsm_*() macros can terminate a procedure on certain * errors. * - * VOP_ABORTOP() only frees the path component if HASBUF is set and - * SAVESTART is *not* set. - * - * Various VOP_*() routines tend to free the path component if an - * error occurs. If no error occurs, the VOP_*() routines only free - * the path component if SAVESTART is NOT set. - * * Certain VOP calls (VOP_SYMLINK, VOP_MKNOD), lookup(), and namei() * may return garbage in various structural fields/return elements * if an error is returned, and may garbage up nd.ni_dvp even if no @@ -595,6 +588,10 @@ */ vrele(ndp->ni_startdir); ndp->ni_startdir = NULL; + /* XXX We have no vnode that we are certain we can call + VOP_RELEASEND on here. nd.ni_vp could potentially be a + different filesystem from what nd.ni_dvp would have + been. I think. */ zfree(namei_zone, nd.ni_cnd.cn_pnbuf); nd.ni_cnd.cn_flags &= ~HASBUF; @@ -629,6 +626,7 @@ nfsmout: if (dirp) vrele(dirp); + /* XXX We do not have any dvp for VOP_RELEASEND() (see above) */ if (nd.ni_cnd.cn_flags & HASBUF) zfree(namei_zone, nd.ni_cnd.cn_pnbuf); if (ndp->ni_startdir) @@ -1664,6 +1662,7 @@ nqsrv_getl(nd.ni_dvp, ND_WRITE); error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, vap); if (error) { + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; } else { nfsrv_object_create(nd.ni_vp); @@ -1701,6 +1700,7 @@ error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, vap); nd.ni_vp = NULL; if (error) { + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; goto nfsmreply0; } @@ -1795,13 +1795,8 @@ if (dirp) vrele(dirp); if (nd.ni_cnd.cn_flags & HASBUF) { - /* - * Since SAVESTART is set, we own the buffer and need to - * zfree it ourselves. - */ - if (nd.ni_dvp) - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); - zfree(namei_zone, nd.ni_cnd.cn_pnbuf); + KASSERT(nd.ni_dvp, ("Missing dvp (XXX Can this happen?")); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); } if (nd.ni_dvp) { if (nd.ni_dvp == nd.ni_vp) @@ -1899,8 +1894,10 @@ nd.ni_startdir = NULL; nqsrv_getl(nd.ni_dvp, ND_WRITE); error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, vap); - if (error) + if (error) { + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; + } } else { if (vtyp != VFIFO && (error = suser_xxx(cred, 0, 0))) goto out; @@ -1914,6 +1911,7 @@ nd.ni_vp = NULL; if (error) { + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; goto out; } @@ -1947,14 +1945,8 @@ nd.ni_startdir = NULL; } if (nd.ni_cnd.cn_flags & HASBUF) { - /* - * Since SAVESTART is set, we own the buffer and need to - * zfree it ourselves. - */ - if (nd.ni_dvp) - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; - zfree(namei_zone, nd.ni_cnd.cn_pnbuf); } if (nd.ni_dvp) { if (nd.ni_dvp == nd.ni_vp) @@ -1991,15 +1983,8 @@ vrele(dirp); if (nd.ni_startdir) vrele(nd.ni_startdir); - if (nd.ni_cnd.cn_flags & HASBUF) { - /* - * Since SAVESTART is set, we own the buffer and need to - * zfree it ourselves. - */ - if (nd.ni_dvp) - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); - zfree(namei_zone, nd.ni_cnd.cn_pnbuf); - } + if (nd.ni_cnd.cn_flags & HASBUF) + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp) { if (nd.ni_dvp == nd.ni_vp) vrele(nd.ni_dvp); @@ -2077,6 +2062,7 @@ nqsrv_getl(nd.ni_dvp, ND_WRITE); nqsrv_getl(nd.ni_vp, ND_WRITE); error = VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; } } @@ -2092,12 +2078,7 @@ } nfsmout: if (nd.ni_cnd.cn_flags & HASBUF) { - /* - * Since SAVESTART is not set, this is sufficient to free - * the component buffer. It's actually a NOP since we - * do not save the name, but what the hey. - */ - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); } if (nd.ni_dvp) { if (nd.ni_dvp == nd.ni_vp) @@ -2312,15 +2293,8 @@ vrele(tdirp); if (tond.ni_startdir) vrele(tond.ni_startdir); - if (tond.ni_cnd.cn_flags & HASBUF) { - /* - * The VOP_ABORTOP is probably a NOP. Since we have set - * SAVESTART, we need to zfree the buffer ourselves. - */ - if (tond.ni_dvp) - VOP_ABORTOP(tond.ni_dvp, &tond.ni_cnd); - zfree(namei_zone, tond.ni_cnd.cn_pnbuf); - } + if (tond.ni_cnd.cn_flags & HASBUF) + VOP_RELEASEND(tond.ni_dvp, &tond.ni_cnd); if (tond.ni_dvp) { if (tond.ni_dvp == tond.ni_vp) vrele(tond.ni_dvp); @@ -2337,11 +2311,8 @@ vrele(fdirp); if (fromnd.ni_startdir) vrele(fromnd.ni_startdir); - if (fromnd.ni_cnd.cn_flags & HASBUF) { - if (fromnd.ni_dvp) - VOP_ABORTOP(fromnd.ni_dvp, &fromnd.ni_cnd); - zfree(namei_zone, fromnd.ni_cnd.cn_pnbuf); - } + if (fromnd.ni_cnd.cn_flags & HASBUF) + VOP_RELEASEND(fromnd.ni_dvp, &fromnd.ni_cnd); if (fromnd.ni_dvp) vrele(fromnd.ni_dvp); if (fromnd.ni_vp) @@ -2428,14 +2399,10 @@ error = EXDEV; out: if (!error) { - /* - * Do the link op. Since SAVESTART is not set, the - * underlying path component is freed whether an error - * is returned or not. - */ nqsrv_getl(vp, ND_WRITE); nqsrv_getl(xp, ND_WRITE); error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; } /* fall through */ @@ -2454,14 +2421,8 @@ /* fall through */ nfsmout: - if (nd.ni_cnd.cn_flags & HASBUF) { - /* - * Since we are not using SAVESTART, - * VOP_ABORTOP is sufficient to free the path component - */ - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); - /* zfree(namei_zone, nd.ni_cnd.cn_pnbuf); */ - } + if (nd.ni_cnd.cn_flags & HASBUF) + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (dirp) vrele(dirp); if (vp) @@ -2564,8 +2525,10 @@ nqsrv_getl(nd.ni_dvp, ND_WRITE); error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, vap, pathcp); nd.ni_vp = NULL; - if (error) + if (error) { + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; + } /* * releases directory prior to potential lookup op. */ @@ -2632,15 +2595,8 @@ /* fall through */ nfsmout: - if (nd.ni_cnd.cn_flags & HASBUF) { - /* - * Since SAVESTART is set, we own the buffer and need to - * zfree it ourselves. - */ - if (nd.ni_dvp) - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); - zfree(namei_zone, nd.ni_cnd.cn_pnbuf); - } + if (nd.ni_cnd.cn_flags & HASBUF) + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp) { if (nd.ni_dvp == nd.ni_vp) vrele(nd.ni_dvp); @@ -2733,11 +2689,7 @@ vap->va_type = VDIR; if (nd.ni_vp != NULL) { - /* - * Freeup path component. Since SAVESTART was not set, - * VOP_ABORTOP() will handle it. - */ - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; error = EEXIST; goto out; @@ -2750,6 +2702,7 @@ */ nqsrv_getl(nd.ni_dvp, ND_WRITE); error = VOP_MKDIR(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, vap); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; vpexcl = 1; @@ -2785,12 +2738,8 @@ if (dirp) vrele(dirp); if (nd.ni_dvp) { - /* - * Since SAVESTART is not set, VOP_ABORTOP will always free - * the path component. - */ if (nd.ni_cnd.cn_flags & HASBUF) - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == nd.ni_vp && vpexcl) vrele(nd.ni_dvp); else @@ -2885,9 +2834,8 @@ nqsrv_getl(nd.ni_dvp, ND_WRITE); nqsrv_getl(vp, ND_WRITE); error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); - } else { - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); } + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); nd.ni_cnd.cn_flags &= ~HASBUF; if (dirp) @@ -2900,12 +2848,8 @@ /* fall through */ nfsmout: - /* - * Since SAVESTART is not set, a VOP_ABORTOP is sufficient to - * deal with the pathname component. - */ if (nd.ni_cnd.cn_flags & HASBUF) - VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); + VOP_RELEASEND(nd.ni_dvp, &nd.ni_cnd); if (dirp) vrele(dirp); if (nd.ni_dvp) { Index: nfs/nfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_vnops.c,v retrieving revision 1.143 diff -u -r1.143 nfs_vnops.c --- nfs_vnops.c 1999/10/25 19:22:33 1.143 +++ nfs_vnops.c 1999/11/10 00:40:22 @@ -1249,11 +1249,9 @@ else if (vap->va_type == VFIFO || vap->va_type == VSOCK) rdev = nfs_xdrneg1; else { - VOP_ABORTOP(dvp, cnp); return (EOPNOTSUPP); } if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred, cnp->cn_proc)) != 0) { - VOP_ABORTOP(dvp, cnp); return (error); } nfsstats.rpccnt[NFSPROC_MKNOD]++; @@ -1304,7 +1302,6 @@ cache_enter(dvp, newvp, cnp); *vpp = newvp; } - zfree(namei_zone, cnp->cn_pnbuf); VTONFS(dvp)->n_flag |= NMODIFIED; if (!wccflag) VTONFS(dvp)->n_attrstamp = 0; @@ -1369,7 +1366,6 @@ return (nfs_mknodrpc(dvp, ap->a_vpp, cnp, vap)); if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred, cnp->cn_proc)) != 0) { - VOP_ABORTOP(dvp, cnp); return (error); } if (vap->va_vaflags & VA_EXCLUSIVE) @@ -1436,8 +1432,6 @@ cache_enter(dvp, newvp, cnp); *ap->a_vpp = newvp; } - if (error || (cnp->cn_flags & SAVESTART) == 0) - zfree(namei_zone, cnp->cn_pnbuf); VTONFS(dvp)->n_flag |= NMODIFIED; if (!wccflag) VTONFS(dvp)->n_attrstamp = 0; @@ -1509,7 +1503,6 @@ error = 0; } else if (!np->n_sillyrename) error = nfs_sillyrename(dvp, vp, cnp); - zfree(namei_zone, cnp->cn_pnbuf); np->n_attrstamp = 0; return (error); } @@ -1629,14 +1622,12 @@ } out: - VOP_ABORTOP(tdvp, tcnp); if (tdvp == tvp) vrele(tdvp); else vput(tdvp); if (tvp) vput(tvp); - VOP_ABORTOP(fdvp, fcnp); vrele(fdvp); vrele(fvp); /* @@ -1728,7 +1719,6 @@ int v3; if (vp->v_mount != tdvp->v_mount) { - VOP_ABORTOP(tdvp, cnp); return (EXDEV); } @@ -1752,7 +1742,6 @@ nfsm_wcc_data(tdvp, wccflag); } nfsm_reqdone; - zfree(namei_zone, cnp->cn_pnbuf); VTONFS(tdvp)->n_flag |= NMODIFIED; if (!attrflag) VTONFS(vp)->n_attrstamp = 0; @@ -1828,12 +1817,6 @@ */ if (error == EEXIST) error = 0; - /* - * cnp's buffer expected to be freed if SAVESTART not set or - * if an error was returned. - */ - if (error || (cnp->cn_flags & SAVESTART) == 0) - zfree(namei_zone, cnp->cn_pnbuf); return (error); } @@ -1867,7 +1850,6 @@ int v3 = NFS_ISV3(dvp); if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred, cnp->cn_proc)) != 0) { - VOP_ABORTOP(dvp, cnp); return (error); } len = cnp->cn_namelen; @@ -1918,8 +1900,6 @@ vrele(newvp); } else *ap->a_vpp = newvp; - if (error || (cnp->cn_flags & SAVESTART) == 0) - zfree(namei_zone, cnp->cn_pnbuf); return (error); } @@ -1956,7 +1936,6 @@ if (v3) nfsm_wcc_data(dvp, wccflag); nfsm_reqdone; - zfree(namei_zone, cnp->cn_pnbuf); VTONFS(dvp)->n_flag |= NMODIFIED; if (!wccflag) VTONFS(dvp)->n_attrstamp = 0; Index: nwfs/nwfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/nwfs/nwfs_vnops.c,v retrieving revision 1.3 diff -u -r1.3 nwfs_vnops.c --- nwfs_vnops.c 1999/10/14 09:35:37 1.3 +++ nwfs_vnops.c 1999/11/10 00:50:54 @@ -447,7 +447,6 @@ if (vap->va_type == VSOCK) return (EOPNOTSUPP); if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred, cnp->cn_proc))) { - VOP_ABORTOP(dvp, cnp); return (error); } fmode = AR_READ | AR_WRITE; @@ -470,7 +469,6 @@ if (cnp->cn_flags & MAKEENTRY) cache_enter(dvp, vp, cnp); } - zfree(namei_zone, cnp->cn_pnbuf); return (error); } @@ -504,7 +502,6 @@ cnp->cn_namelen,cnp->cn_nameptr,cnp->cn_proc,cnp->cn_cred); if (error == 0x899c) error = EACCES; } - zfree(namei_zone, cnp->cn_pnbuf); return (error); } @@ -598,9 +595,7 @@ /* * nwfs hard link create call - * Netware filesystems don't know what links are. But since we already called - * nwfs_lookup() with create and lockparent, the parent is locked so we - * have to free it before we return the error. + * Netware filesystems don't know what links are. */ static int nwfs_link(ap) @@ -610,8 +605,6 @@ struct componentname *a_cnp; } */ *ap; { -/* VOP_ABORTOP(ap->a_tdvp, ap->a_cnp);*/ - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return EOPNOTSUPP; } @@ -629,8 +622,6 @@ char *a_target; } */ *ap; { - zfree(namei_zone, ap->a_cnp->cn_pnbuf); - /* VOP_ABORTOP(ap->a_dvp, ap->a_cnp); ??? */ return (EOPNOTSUPP); } @@ -666,11 +657,9 @@ char *name=cnp->cn_nameptr; if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred, cnp->cn_proc))) { - VOP_ABORTOP(dvp, cnp); return (error); } if ((name[0] == '.') && ((len == 1) || ((len == 2) && (name[1] == '.')))) { - VOP_ABORTOP(dvp, cnp); return EEXIST; } if (ncp_open_create_file_or_subdir(VTONWFS(dvp),dvp, cnp->cn_namelen, @@ -690,7 +679,6 @@ *ap->a_vpp = newvp; } } - zfree(namei_zone, cnp->cn_pnbuf); return (error); } @@ -718,7 +706,6 @@ error = ncp_DeleteNSEntry(nmp, dnp->n_fid.f_id, cnp->cn_namelen, cnp->cn_nameptr,cnp->cn_proc,cnp->cn_cred); if (error == NWE_DIR_NOT_EMPTY) error = ENOTEMPTY; - zfree(namei_zone, cnp->cn_pnbuf); dnp->n_flag |= NMODIFIED; nwfs_attr_cacheremove(dvp); cache_purge(dvp); @@ -870,9 +857,6 @@ struct componentname *a_cnp; } */ *ap; { - - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return (0); } Index: ufs/ufs/ufs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_vnops.c,v retrieving revision 1.125 diff -u -r1.125 ufs_vnops.c --- ufs_vnops.c 1999/11/03 12:05:38 1.125 +++ ufs_vnops.c 1999/11/10 01:22:47 @@ -732,22 +732,18 @@ panic("ufs_link: no name"); #endif if (tdvp->v_mount != vp->v_mount) { - VOP_ABORTOP(tdvp, cnp); error = EXDEV; goto out2; } if (tdvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE, p))) { - VOP_ABORTOP(tdvp, cnp); goto out2; } ip = VTOI(vp); if ((nlink_t)ip->i_nlink >= LINK_MAX) { - VOP_ABORTOP(tdvp, cnp); error = EMLINK; goto out1; } if (ip->i_flags & (IMMUTABLE | APPEND)) { - VOP_ABORTOP(tdvp, cnp); error = EPERM; goto out1; } @@ -767,7 +763,6 @@ ip->i_nlink--; ip->i_flag |= IN_CHANGE; } - zfree(namei_zone, cnp->cn_pnbuf); out1: if (tdvp != vp) VOP_UNLOCK(vp, 0, p); @@ -829,10 +824,6 @@ default: panic("ufs_whiteout: unknown op"); } - if (cnp->cn_flags & HASBUF) { - zfree(namei_zone, cnp->cn_pnbuf); - cnp->cn_flags &= ~HASBUF; - } return (error); } @@ -895,14 +886,12 @@ (tvp && (fvp->v_mount != tvp->v_mount))) { error = EXDEV; abortit: - VOP_ABORTOP(tdvp, tcnp); if (tdvp == tvp) vrele(tdvp); else vput(tdvp); if (tvp) vput(tvp); - VOP_ABORTOP(fdvp, fcnp); vrele(fdvp); vrele(fvp); return (error); @@ -936,7 +925,6 @@ } /* Release destination completely. */ - VOP_ABORTOP(tdvp, tcnp); vput(tdvp); vput(tvp); @@ -1345,7 +1333,6 @@ #ifdef QUOTA if ((error = getinoquota(ip)) || (error = chkiq(ip, 1, ucp, 0))) { - zfree(namei_zone, cnp->cn_pnbuf); UFS_VFREE(tvp, ip->i_number, dmode); vput(tvp); return (error); @@ -1357,7 +1344,6 @@ #ifdef QUOTA if ((error = getinoquota(ip)) || (error = chkiq(ip, 1, cnp->cn_cred, 0))) { - zfree(namei_zone, cnp->cn_pnbuf); UFS_VFREE(tvp, ip->i_number, dmode); vput(tvp); return (error); @@ -1461,7 +1447,6 @@ vput(tvp); } out: - zfree(namei_zone, cnp->cn_pnbuf); return (error); } @@ -1739,8 +1724,6 @@ struct componentname *a_cnp; } */ *ap; { - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - zfree(namei_zone, ap->a_cnp->cn_pnbuf); return (0); }