From a827838a1a97317dff1d1b709c70e63c7b4f2429 Mon Sep 17 00:00:00 2001 From: pjd Date: Thu, 24 Mar 2011 20:28:09 +0000 Subject: 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 Discussed with: Eric Schrock Discussed with: Mark Maybee MFC after: 1 month --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 5 ----- 1 file changed, 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 436f008..17eedee 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 -- cgit v1.1