diff options
author | mckusick <mckusick@FreeBSD.org> | 1998-09-29 23:39:37 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 1998-09-29 23:39:37 +0000 |
commit | 79fbc60c6a6e25dedfe124d2459c0148c69a3cee (patch) | |
tree | 9c3c81877fe5a98065f0637ac669934b9d9a87b8 /sys/nfs | |
parent | 74f40b1c410748fa6dde627310c77db7c4524d7a (diff) | |
download | FreeBSD-src-79fbc60c6a6e25dedfe124d2459c0148c69a3cee.zip FreeBSD-src-79fbc60c6a6e25dedfe124d2459c0148c69a3cee.tar.gz |
In nfs_link(), check for a cross-device mount *before* looking
in the v_data field.
Obtained from: Charles Hannum, via Frank van der Linden <frank@wins.uva.nl>
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_vnops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 0e99280..e4917c1 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.106 1998/08/13 08:09:08 dfr Exp $ + * $Id: nfs_vnops.c,v 1.108 1998/09/29 23:29:48 mckusick Exp $ */ @@ -1700,7 +1700,7 @@ nfs_link(ap) caddr_t bpos, dpos, cp2; int error = 0, wccflag = NFSV3_WCCRATTR, attrflag = 0; struct mbuf *mreq, *mrep, *md, *mb, *mb2; - int v3 = NFS_ISV3(vp); + int v3; if (vp->v_mount != tdvp->v_mount) { VOP_ABORTOP(tdvp, cnp); @@ -1715,6 +1715,7 @@ nfs_link(ap) */ VOP_FSYNC(vp, cnp->cn_cred, MNT_WAIT, cnp->cn_proc); + v3 = NFS_ISV3(vp); nfsstats.rpccnt[NFSPROC_LINK]++; nfsm_reqhead(vp, NFSPROC_LINK, NFSX_FH(v3)*2 + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen)); |