Fix handling of _PC_HAS_HIDDENSYSTEM for FreeBSD

The hidden and system flags are only supported for
ZFS pools if the z_use_fuids is true.  Fix
zfs_freebsd_pathconf() to check this.

Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Rick Macklem <[email protected]>
Closes #18688
This commit is contained in:
rmacklem authored and GitHub committed 2026-06-22 09:29:24 -04:00
1 parent c0f62d4fdf
commit 87593ea2b3
1 file changed
+7 -2
+7 -2
View File
@@ -5751,7 +5751,8 @@ zfs_freebsd_pathconf(struct vop_pathconf_args *ap)
{
ulong_t val;
int error;
#if defined(_PC_CLONE_BLKSIZE) || defined(_PC_CASE_INSENSITIVE)
#if defined(_PC_CLONE_BLKSIZE) || defined(_PC_CASE_INSENSITIVE) || \
defined(_PC_HAS_HIDDENSYSTEM)
zfsvfs_t *zfsvfs;
#endif
@@ -5797,7 +5798,11 @@ zfs_freebsd_pathconf(struct vop_pathconf_args *ap)
#endif
#ifdef _PC_HAS_HIDDENSYSTEM
case _PC_HAS_HIDDENSYSTEM:
*ap->a_retval = 1;
zfsvfs = (zfsvfs_t *)ap->a_vp->v_mount->mnt_data;
if (zfsvfs->z_use_fuids == B_TRUE)
*ap->a_retval = 1;
else
*ap->a_retval = 0;
return (0);
#endif
#ifdef _PC_CLONE_BLKSIZE