svn commit: r219973 -
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Pawel Jakub Dawidek
pjd at FreeBSD.org
Thu Mar 24 20:28:09 UTC 2011
Author: pjd
Date: Thu Mar 24 20:28:09 2011
New Revision: 219973
URL: http://svn.freebsd.org/changeset/base/219973
Log:
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 at ijs.si>
Discussed with: Eric Schrock <eric.schrock at delphix.com>
Discussed with: Mark Maybee <Mark.Maybee at Oracle.COM>
MFC after: 1 month
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 24 20:15:42 2011 (r219972)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 24 20:28:09 2011 (r219973)
@@ -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
More information about the svn-src-head
mailing list