Add _PC_ACL_* to vop_stdpathconf
This avoid EINVAL from tmpfs etc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D19512
This commit is contained in:
parent
76cefcd810
commit
f5fdf82d82
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345024
@ -755,10 +755,6 @@ zfsctl_common_pathconf(ap)
|
|||||||
*ap->a_retval = (int)SPA_MINBLOCKSIZE;
|
*ap->a_retval = (int)SPA_MINBLOCKSIZE;
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
case _PC_ACL_EXTENDED:
|
|
||||||
*ap->a_retval = 0;
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
case _PC_ACL_NFS4:
|
case _PC_ACL_NFS4:
|
||||||
*ap->a_retval = 1;
|
*ap->a_retval = 1;
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -2258,9 +2258,6 @@ nandfs_pathconf(struct vop_pathconf_args *ap)
|
|||||||
case _PC_NO_TRUNC:
|
case _PC_NO_TRUNC:
|
||||||
*ap->a_retval = 1;
|
*ap->a_retval = 1;
|
||||||
break;
|
break;
|
||||||
case _PC_ACL_EXTENDED:
|
|
||||||
*ap->a_retval = 0;
|
|
||||||
break;
|
|
||||||
case _PC_ALLOC_SIZE_MIN:
|
case _PC_ALLOC_SIZE_MIN:
|
||||||
*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_bsize;
|
*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_bsize;
|
||||||
break;
|
break;
|
||||||
|
@ -3511,9 +3511,6 @@ nfs_pathconf(struct vop_pathconf_args *ap)
|
|||||||
case _PC_NO_TRUNC:
|
case _PC_NO_TRUNC:
|
||||||
*ap->a_retval = pc.pc_notrunc;
|
*ap->a_retval = pc.pc_notrunc;
|
||||||
break;
|
break;
|
||||||
case _PC_ACL_EXTENDED:
|
|
||||||
*ap->a_retval = 0;
|
|
||||||
break;
|
|
||||||
case _PC_ACL_NFS4:
|
case _PC_ACL_NFS4:
|
||||||
if (NFS_ISV4(vp) && nfsrv_useacl != 0 && attrflag != 0 &&
|
if (NFS_ISV4(vp) && nfsrv_useacl != 0 && attrflag != 0 &&
|
||||||
NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL))
|
NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL))
|
||||||
@ -3527,9 +3524,6 @@ nfs_pathconf(struct vop_pathconf_args *ap)
|
|||||||
else
|
else
|
||||||
*ap->a_retval = 3;
|
*ap->a_retval = 3;
|
||||||
break;
|
break;
|
||||||
case _PC_MAC_PRESENT:
|
|
||||||
*ap->a_retval = 0;
|
|
||||||
break;
|
|
||||||
case _PC_PRIO_IO:
|
case _PC_PRIO_IO:
|
||||||
*ap->a_retval = 0;
|
*ap->a_retval = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -482,6 +482,13 @@ vop_stdpathconf(ap)
|
|||||||
case _PC_PATH_MAX:
|
case _PC_PATH_MAX:
|
||||||
*ap->a_retval = PATH_MAX;
|
*ap->a_retval = PATH_MAX;
|
||||||
return (0);
|
return (0);
|
||||||
|
case _PC_ACL_EXTENDED:
|
||||||
|
case _PC_ACL_NFS4:
|
||||||
|
case _PC_CAP_PRESENT:
|
||||||
|
case _PC_INF_PRESENT:
|
||||||
|
case _PC_MAC_PRESENT:
|
||||||
|
*ap->a_retval = 0;
|
||||||
|
return (0);
|
||||||
default:
|
default:
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
}
|
}
|
||||||
|
@ -2421,28 +2421,20 @@ ufs_pathconf(ap)
|
|||||||
case _PC_NO_TRUNC:
|
case _PC_NO_TRUNC:
|
||||||
*ap->a_retval = 1;
|
*ap->a_retval = 1;
|
||||||
break;
|
break;
|
||||||
case _PC_ACL_EXTENDED:
|
|
||||||
#ifdef UFS_ACL
|
#ifdef UFS_ACL
|
||||||
|
case _PC_ACL_EXTENDED:
|
||||||
if (ap->a_vp->v_mount->mnt_flag & MNT_ACLS)
|
if (ap->a_vp->v_mount->mnt_flag & MNT_ACLS)
|
||||||
*ap->a_retval = 1;
|
*ap->a_retval = 1;
|
||||||
else
|
else
|
||||||
*ap->a_retval = 0;
|
*ap->a_retval = 0;
|
||||||
#else
|
|
||||||
*ap->a_retval = 0;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _PC_ACL_NFS4:
|
case _PC_ACL_NFS4:
|
||||||
#ifdef UFS_ACL
|
|
||||||
if (ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS)
|
if (ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS)
|
||||||
*ap->a_retval = 1;
|
*ap->a_retval = 1;
|
||||||
else
|
else
|
||||||
*ap->a_retval = 0;
|
*ap->a_retval = 0;
|
||||||
#else
|
|
||||||
*ap->a_retval = 0;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case _PC_ACL_PATH_MAX:
|
case _PC_ACL_PATH_MAX:
|
||||||
#ifdef UFS_ACL
|
#ifdef UFS_ACL
|
||||||
if (ap->a_vp->v_mount->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS))
|
if (ap->a_vp->v_mount->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS))
|
||||||
@ -2453,16 +2445,14 @@ ufs_pathconf(ap)
|
|||||||
*ap->a_retval = 3;
|
*ap->a_retval = 3;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case _PC_MAC_PRESENT:
|
|
||||||
#ifdef MAC
|
#ifdef MAC
|
||||||
|
case _PC_MAC_PRESENT:
|
||||||
if (ap->a_vp->v_mount->mnt_flag & MNT_MULTILABEL)
|
if (ap->a_vp->v_mount->mnt_flag & MNT_MULTILABEL)
|
||||||
*ap->a_retval = 1;
|
*ap->a_retval = 1;
|
||||||
else
|
else
|
||||||
*ap->a_retval = 0;
|
*ap->a_retval = 0;
|
||||||
#else
|
|
||||||
*ap->a_retval = 0;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case _PC_MIN_HOLE_SIZE:
|
case _PC_MIN_HOLE_SIZE:
|
||||||
*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize;
|
*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user