aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2011-03-24 20:28:09 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2011-03-24 20:28:09 +0000
commit65612637e802602c3de266ccfe09da1866d2c2aa (patch)
tree569dfa8459e11335084fc18365d39359abce9e9d
parentf9db2550b28ff7b5015f2628f172c4a123b5663d (diff)
Checking file access on size change is bogus. The checks are done earlier by
VFS where we know if this is truncate(2) or ftruncate(2). If this is the latter we should depend on the mode the file was opened and not on the current permission. PR: standards/154873 Reported by: Mark Martinec <Mark.Martinec@ijs.si> Discussed with: Eric Schrock <eric.schrock@delphix.com> Discussed with: Mark Maybee <Mark.Maybee@Oracle.COM> MFC after: 1 month
Notes
Notes: svn path=/head/; revision=219973
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
index 436f008ceb50..17eedee0a557 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
@@ -2962,11 +2962,6 @@ top:
*/
if (mask & AT_SIZE) {
- err = zfs_zaccess(zp, ACE_WRITE_DATA, 0, skipaclchk, cr);
- if (err) {
- ZFS_EXIT(zfsvfs);
- return (err);
- }
/*
* XXX - Note, we are not providing any open
* mode flags here (like FNDELAY), so we may