mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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
This commit is contained in:
parent
7c864d7df9
commit
a5988eb997
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue