diff options
author | kib <kib@FreeBSD.org> | 2014-07-30 03:56:17 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-07-30 03:56:17 +0000 |
commit | 4af1d57b25130479d52f78618815e22d50cff4d8 (patch) | |
tree | da99d07701f732cb9a7ea1f978fc1e8a5724dfe9 /sys/fs/tmpfs | |
parent | 7c889ea487454b0962d2e64bd3110b9549a88afa (diff) | |
download | FreeBSD-src-4af1d57b25130479d52f78618815e22d50cff4d8.zip FreeBSD-src-4af1d57b25130479d52f78618815e22d50cff4d8.tar.gz |
MFC r268764:
Check for the cross-device cross-link attempt in the VFS, instead of
VOP_LINK() implemenations.
Diffstat (limited to 'sys/fs/tmpfs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 23bb3c5..e656f2c 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -573,21 +573,6 @@ tmpfs_link(struct vop_link_args *v) MPASS(VOP_ISLOCKED(dvp)); MPASS(cnp->cn_flags & HASBUF); MPASS(dvp != vp); /* XXX When can this be false? */ - - /* XXX: Why aren't the following two tests done by the caller? */ - - /* Hard links of directories are forbidden. */ - if (vp->v_type == VDIR) { - error = EPERM; - goto out; - } - - /* Cannot create cross-device links. */ - if (dvp->v_mount != vp->v_mount) { - error = EXDEV; - goto out; - } - node = VP_TO_TMPFS_NODE(vp); /* Ensure that we do not overflow the maximum number of links imposed |