diff options
author | dim <dim@FreeBSD.org> | 2012-01-03 20:53:07 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-01-03 20:53:07 +0000 |
commit | b168d78675f739ce802bf0e2264c8ae4c538e984 (patch) | |
tree | 287f2212cb6cc84cbe68ba2718b4848881ae854c /sys/cddl | |
parent | f91472c403b3dc0113c57d7742edefc496ab5b68 (diff) | |
download | FreeBSD-src-b168d78675f739ce802bf0e2264c8ae4c538e984.zip FreeBSD-src-b168d78675f739ce802bf0e2264c8ae4c538e984.tar.gz |
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
MFC after: 1 week
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 2 |
1 files changed, 1 insertions, 1 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 d218ab6..74c80c3 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 @@ -2698,7 +2698,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, 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; |