Fixed VOP_LINK argument order botch.

This commit is contained in:
David Greenman 1995-06-28 07:06:55 +00:00
parent c5f944ee5a
commit 9879652657
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9354
13 changed files with 40 additions and 40 deletions

View File

@ -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;
}

View File

@ -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 <sys/param.h>
@ -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

View File

@ -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 <sys/param.h>
@ -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)

View File

@ -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 <sys/param.h>
@ -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)

View File

@ -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;
};

View File

@ -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 <sys/param.h>
@ -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

View File

@ -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;
}

View File

@ -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);

View File

@ -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!

View File

@ -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!

View File

@ -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);

View File

@ -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 <sys/param.h>
@ -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);
}

View File

@ -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 <sys/param.h>
@ -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);
}