Author: dim
Date: Tue Jan 10 07:46:35 2012
New Revision: 229925
URL: http://svn.freebsd.org/changeset/base/229925

Log:
  MFC r229425:
  
  In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c, check the
  the number of links against LINK_MAX (which is INT16_MAX), not against
  UINT32_MAX.  Otherwise, the constant would implicitly be converted to
  -1.
  
  Reviewed by:  pjd

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Jan 
10 07:45:00 2012        (r229924)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Jan 
10 07:46:35 2012        (r229925)
@@ -2698,7 +2698,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i
                links = zp->z_links + 1;
        else
                links = zp->z_links;
-       vap->va_nlink = MIN(links, UINT32_MAX); /* nlink_t limit! */
+       vap->va_nlink = MIN(links, LINK_MAX);   /* nlink_t limit! */
        vap->va_size = zp->z_size;
 #ifdef sun
        vap->va_rdev = vp->v_rdev;
_______________________________________________
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