Author: delphij
Date: Thu Oct  1 18:58:26 2009
New Revision: 197683
URL: http://svn.freebsd.org/changeset/base/197683

Log:
  Return EOPNOTSUPP instead of EINVAL when doing chflags(2) over an old
  format ZFS, as defined in the manual page.
  
  Submitted by: pjd (response of my original patch but bugs are mine)
  MFC after:    3 days

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 Oct 
 1 18:37:16 2009        (r197682)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c     Thu Oct 
 1 18:58:26 2009        (r197683)
@@ -4180,8 +4180,12 @@ zfs_freebsd_setattr(ap)
        zflags = VTOZ(vp)->z_phys->zp_flags;
 
        if (vap->va_flags != VNOVAL) {
+               zfsvfs_t *zfsvfs = VTOZ(vp)->z_zfsvfs;
                int error;
 
+               if (zfsvfs->z_use_fuids == B_FALSE)
+                       return (EOPNOTSUPP);
+
                fflags = vap->va_flags;
                if ((fflags & ~(SF_IMMUTABLE|SF_APPEND|SF_NOUNLINK|UF_NODUMP)) 
!= 0)
                        return (EOPNOTSUPP);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to