mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
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:
1 parent
c0f62d4fdf
commit
87593ea2b3
1 file changed
+7
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user