Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 2009 18:58:26 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197683 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200910011858.n91IwQhM061711@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910011858.n91IwQhM061711>