summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ufs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-07-16 14:04:46 +0000
committerkib <kib@FreeBSD.org>2014-07-16 14:04:46 +0000
commit32a7383c85234a8aacc33c0415ab10beec2e0da3 (patch)
treed402822e2dc2ab92fb22d185c4e7be6a3d01ed96 /sys/ufs/ufs
parent508ee54556732e7fb194230700780b603987b02a (diff)
downloadFreeBSD-src-32a7383c85234a8aacc33c0415ab10beec2e0da3.zip
FreeBSD-src-32a7383c85234a8aacc33c0415ab10beec2e0da3.tar.gz
Check for the cross-device cross-link attempt in the VFS, instead of
forcing filesystem VOP_LINK() methods to repeat the code. In tmpfs_link(), remove redundand check for the type of the source, already done by VFS. Note that NFS server already performs this check before calling VOP_LINK(). Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'sys/ufs/ufs')
-rw-r--r--sys/ufs/ufs/ufs_vnops.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 3504f0e..3379b13 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -968,10 +968,6 @@ ufs_link(ap)
if ((cnp->cn_flags & HASBUF) == 0)
panic("ufs_link: no name");
#endif
- if (tdvp->v_mount != vp->v_mount) {
- error = EXDEV;
- goto out;
- }
if (VTOI(tdvp)->i_effnlink < 2)
panic("ufs_link: Bad link count %d on parent",
VTOI(tdvp)->i_effnlink);
OpenPOWER on IntegriCloud