diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 2c41c9c0a88a..49de28cc5ea9 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.16.2.3 1995/06/02 11:03:15 davidg Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.17 1995/06/11 19:31:37 rgrimes Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -908,8 +908,8 @@ msdosfs_link(ap) struct componentname *a_cnp; } */ *ap; { - VOP_ABORTOP(ap->a_vp, ap->a_cnp); - vput(ap->a_vp); + VOP_ABORTOP(ap->a_tdvp, ap->a_cnp); + vput(ap->a_tdvp); return EOPNOTSUPP; } diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index df1935b1651e..0a1be17102af 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.6 (Berkeley) 2/17/94 - * $Id: union_vnops.c,v 1.7 1994/10/10 07:55:48 phk Exp $ + * $Id: union_vnops.c,v 1.8 1994/11/04 14:41:46 davidg Exp $ */ #include @@ -919,7 +919,7 @@ union_link(ap) VREF(vp); vrele(ap->a_tdvp); - error = VOP_LINK(dvp, vp, ap->a_cnp); + error = VOP_LINK(vp, dvp, ap->a_cnp); } else { /* * XXX: need to copy to upper layer diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 7b4c9fec3b2c..2e2315e68aa1 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.24 1995/05/15 08:39:31 davidg Exp $ + * $Id: vfs_syscalls.c,v 1.25 1995/05/21 21:38:52 davidg Exp $ */ #include @@ -844,7 +844,7 @@ link(p, uap, retval) p, p->p_ucred, LEASE_WRITE); LEASE_CHECK(vp, p, p->p_ucred, LEASE_WRITE); - error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); + error = VOP_LINK(vp, nd.ni_dvp, &nd.ni_cnd); } else { VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == nd.ni_vp) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 7b4c9fec3b2c..2e2315e68aa1 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.24 1995/05/15 08:39:31 davidg Exp $ + * $Id: vfs_syscalls.c,v 1.25 1995/05/21 21:38:52 davidg Exp $ */ #include @@ -844,7 +844,7 @@ link(p, uap, retval) p, p->p_ucred, LEASE_WRITE); LEASE_CHECK(vp, p, p->p_ucred, LEASE_WRITE); - error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); + error = VOP_LINK(vp, nd.ni_dvp, &nd.ni_cnd); } else { VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == nd.ni_vp) diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 4e36675e5884..8a4180ce3440 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -31,7 +31,7 @@ # SUCH DAMAGE. # # @(#)vnode_if.src 8.3 (Berkeley) 2/3/94 -# $Id: vnode_if.src,v 1.2 1994/08/02 07:43:37 davidg Exp $ +# $Id: vnode_if.src,v 1.3 1994/09/28 16:45:12 dfr Exp $ # vop_lookup { IN struct vnode *dvp; @@ -149,8 +149,8 @@ vop_remove { }; vop_link { - IN WILLRELE struct vnode *vp; - IN struct vnode *tdvp; + IN struct vnode *vp; + IN WILLRELE struct vnode *tdvp; IN struct componentname *cnp; }; diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index df1935b1651e..0a1be17102af 100644 --- a/sys/miscfs/union/union_vnops.c +++ b/sys/miscfs/union/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.6 (Berkeley) 2/17/94 - * $Id: union_vnops.c,v 1.7 1994/10/10 07:55:48 phk Exp $ + * $Id: union_vnops.c,v 1.8 1994/11/04 14:41:46 davidg Exp $ */ #include @@ -919,7 +919,7 @@ union_link(ap) VREF(vp); vrele(ap->a_tdvp); - error = VOP_LINK(dvp, vp, ap->a_cnp); + error = VOP_LINK(vp, dvp, ap->a_cnp); } else { /* * XXX: need to copy to upper layer diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 2c41c9c0a88a..49de28cc5ea9 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.16.2.3 1995/06/02 11:03:15 davidg Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.17 1995/06/11 19:31:37 rgrimes Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -908,8 +908,8 @@ msdosfs_link(ap) struct componentname *a_cnp; } */ *ap; { - VOP_ABORTOP(ap->a_vp, ap->a_cnp); - vput(ap->a_vp); + VOP_ABORTOP(ap->a_tdvp, ap->a_cnp); + vput(ap->a_tdvp); return EOPNOTSUPP; } diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index f82db3b1d8a3..ad1da608a30a 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94 - * $Id: nfs_serv.c,v 1.15 1995/06/11 19:31:45 rgrimes Exp $ + * $Id: nfs_serv.c,v 1.16 1995/06/27 11:06:37 dfr Exp $ */ /* @@ -2026,7 +2026,7 @@ out: if (!error) { nqsrv_getl(vp, ND_WRITE); nqsrv_getl(xp, ND_WRITE); -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__NetBSD__) error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); #else error = VOP_LINK(vp, nd.ni_dvp, &nd.ni_cnd); diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 769b0bb57813..eb2e29765dfa 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94 - * $Id: nfs_vnops.c,v 1.15 1995/05/30 08:12:49 rgrimes Exp $ + * $Id: nfs_vnops.c,v 1.16 1995/06/27 11:06:53 dfr Exp $ */ /* @@ -1651,7 +1651,7 @@ nfs_link(ap) struct componentname *a_cnp; } */ *ap; { -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__NetBSD__) /* * Since the args are reversed in the VOP_LINK() calls, * switch them back. Argh! diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index 769b0bb57813..eb2e29765dfa 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94 - * $Id: nfs_vnops.c,v 1.15 1995/05/30 08:12:49 rgrimes Exp $ + * $Id: nfs_vnops.c,v 1.16 1995/06/27 11:06:53 dfr Exp $ */ /* @@ -1651,7 +1651,7 @@ nfs_link(ap) struct componentname *a_cnp; } */ *ap; { -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__NetBSD__) /* * Since the args are reversed in the VOP_LINK() calls, * switch them back. Argh! diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index f82db3b1d8a3..ad1da608a30a 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94 - * $Id: nfs_serv.c,v 1.15 1995/06/11 19:31:45 rgrimes Exp $ + * $Id: nfs_serv.c,v 1.16 1995/06/27 11:06:37 dfr Exp $ */ /* @@ -2026,7 +2026,7 @@ out: if (!error) { nqsrv_getl(vp, ND_WRITE); nqsrv_getl(xp, ND_WRITE); -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__NetBSD__) error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); #else error = VOP_LINK(vp, nd.ni_dvp, &nd.ni_cnd); diff --git a/sys/ufs/lfs/lfs_vnops.c b/sys/ufs/lfs/lfs_vnops.c index 3d269532133e..3aea1ece5f7a 100644 --- a/sys/ufs/lfs/lfs_vnops.c +++ b/sys/ufs/lfs/lfs_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_vnops.c 8.5 (Berkeley) 12/30/93 - * $Id: lfs_vnops.c,v 1.8 1995/04/09 06:03:42 davidg Exp $ + * $Id: lfs_vnops.c,v 1.9 1995/05/30 08:15:27 rgrimes Exp $ */ #include @@ -388,10 +388,10 @@ lfs_link(ap) { int ret; - SET_DIROP(VTOI(ap->a_vp)->i_lfs); - MARK_VNODE(ap->a_vp); + SET_DIROP(VTOI(ap->a_tdvp)->i_lfs); + MARK_VNODE(ap->a_tdvp); ret = ufs_link(ap); - SET_ENDOP(VTOI(ap->a_vp)->i_lfs); + SET_ENDOP(VTOI(ap->a_tdvp)->i_lfs); return (ret); } diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 48e52dda6ea0..addd221fefaa 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_vnops.c 8.10 (Berkeley) 4/1/94 - * $Id: ufs_vnops.c,v 1.23 1995/05/15 07:31:09 davidg Exp $ + * $Id: ufs_vnops.c,v 1.24 1995/05/30 08:15:39 rgrimes Exp $ */ #include @@ -683,31 +683,31 @@ ufs_link(ap) panic("ufs_link: no name"); #endif if (vp->v_mount != tdvp->v_mount) { - VOP_ABORTOP(vp, cnp); + VOP_ABORTOP(tdvp, cnp); error = EXDEV; goto out2; } - if (vp != tdvp && (error = VOP_LOCK(tdvp))) { - VOP_ABORTOP(vp, cnp); + if (vp != tdvp && (error = VOP_LOCK(vp))) { + VOP_ABORTOP(tdvp, cnp); goto out2; } - ip = VTOI(tdvp); + ip = VTOI(vp); if ((nlink_t)ip->i_nlink >= LINK_MAX) { - VOP_ABORTOP(vp, cnp); + VOP_ABORTOP(tdvp, cnp); error = EMLINK; goto out1; } if (ip->i_flags & (IMMUTABLE | APPEND)) { - VOP_ABORTOP(vp, cnp); + VOP_ABORTOP(tdvp, cnp); error = EPERM; goto out1; } ip->i_nlink++; ip->i_flag |= IN_CHANGE; tv = time; - error = VOP_UPDATE(tdvp, &tv, &tv, 1); + error = VOP_UPDATE(vp, &tv, &tv, 1); if (!error) - error = ufs_direnter(ip, vp, cnp); + error = ufs_direnter(ip, tdvp, cnp); if (error) { ip->i_nlink--; ip->i_flag |= IN_CHANGE; @@ -715,9 +715,9 @@ ufs_link(ap) FREE(cnp->cn_pnbuf, M_NAMEI); out1: if (vp != tdvp) - VOP_UNLOCK(tdvp); + VOP_UNLOCK(vp); out2: - vput(vp); + vput(tdvp); return (error); }