Date: Mon, 8 Apr 2019 15:52:13 +0000 (UTC) From: "Simon J. Gerraty" <sjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346032 - in stable/11/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nandfs fs/nfsclient kern ufs/ufs Message-ID: <201904081552.x38FqDhN069887@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sjg Date: Mon Apr 8 15:52:13 2019 New Revision: 346032 URL: https://svnweb.freebsd.org/changeset/base/346032 Log: Add _PC_ACL_* to vop_stdpathconf This avoid EINVAL from tmpfs etc. Merge of r345024 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D19512 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/11/sys/fs/nandfs/nandfs_vnops.c stable/11/sys/fs/nfsclient/nfs_clvnops.c stable/11/sys/kern/vfs_default.c stable/11/sys/ufs/ufs/ufs_vnops.c Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Apr 8 15:20:05 2019 (r346031) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Apr 8 15:52:13 2019 (r346032) @@ -755,10 +755,6 @@ zfsctl_common_pathconf(ap) *ap->a_retval = (int)SPA_MINBLOCKSIZE; return (0); - case _PC_ACL_EXTENDED: - *ap->a_retval = 0; - return (0); - case _PC_ACL_NFS4: *ap->a_retval = 1; return (0); Modified: stable/11/sys/fs/nandfs/nandfs_vnops.c ============================================================================== --- stable/11/sys/fs/nandfs/nandfs_vnops.c Mon Apr 8 15:20:05 2019 (r346031) +++ stable/11/sys/fs/nandfs/nandfs_vnops.c Mon Apr 8 15:52:13 2019 (r346032) @@ -2255,9 +2255,6 @@ nandfs_pathconf(struct vop_pathconf_args *ap) case _PC_NO_TRUNC: *ap->a_retval = 1; break; - case _PC_ACL_EXTENDED: - *ap->a_retval = 0; - break; case _PC_ALLOC_SIZE_MIN: *ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_bsize; break; Modified: stable/11/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 8 15:20:05 2019 (r346031) +++ stable/11/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 8 15:52:13 2019 (r346032) @@ -3481,9 +3481,6 @@ nfs_pathconf(struct vop_pathconf_args *ap) case _PC_NO_TRUNC: *ap->a_retval = pc.pc_notrunc; break; - case _PC_ACL_EXTENDED: - *ap->a_retval = 0; - break; case _PC_ACL_NFS4: if (NFS_ISV4(vp) && nfsrv_useacl != 0 && attrflag != 0 && NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL)) @@ -3496,9 +3493,6 @@ nfs_pathconf(struct vop_pathconf_args *ap) *ap->a_retval = ACL_MAX_ENTRIES; else *ap->a_retval = 3; - break; - case _PC_MAC_PRESENT: - *ap->a_retval = 0; break; case _PC_PRIO_IO: *ap->a_retval = 0; Modified: stable/11/sys/kern/vfs_default.c ============================================================================== --- stable/11/sys/kern/vfs_default.c Mon Apr 8 15:20:05 2019 (r346031) +++ stable/11/sys/kern/vfs_default.c Mon Apr 8 15:52:13 2019 (r346032) @@ -480,6 +480,13 @@ vop_stdpathconf(ap) case _PC_PATH_MAX: *ap->a_retval = PATH_MAX; 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: return (EINVAL); } Modified: stable/11/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_vnops.c Mon Apr 8 15:20:05 2019 (r346031) +++ stable/11/sys/ufs/ufs/ufs_vnops.c Mon Apr 8 15:52:13 2019 (r346032) @@ -2415,28 +2415,20 @@ ufs_pathconf(ap) case _PC_NO_TRUNC: *ap->a_retval = 1; break; - case _PC_ACL_EXTENDED: #ifdef UFS_ACL + case _PC_ACL_EXTENDED: if (ap->a_vp->v_mount->mnt_flag & MNT_ACLS) *ap->a_retval = 1; else *ap->a_retval = 0; -#else - *ap->a_retval = 0; -#endif break; - case _PC_ACL_NFS4: -#ifdef UFS_ACL if (ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) *ap->a_retval = 1; else *ap->a_retval = 0; -#else - *ap->a_retval = 0; -#endif break; - +#endif case _PC_ACL_PATH_MAX: #ifdef UFS_ACL if (ap->a_vp->v_mount->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS)) @@ -2447,16 +2439,14 @@ ufs_pathconf(ap) *ap->a_retval = 3; #endif break; - case _PC_MAC_PRESENT: #ifdef MAC + case _PC_MAC_PRESENT: if (ap->a_vp->v_mount->mnt_flag & MNT_MULTILABEL) *ap->a_retval = 1; else *ap->a_retval = 0; -#else - *ap->a_retval = 0; -#endif break; +#endif case _PC_MIN_HOLE_SIZE: *ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904081552.x38FqDhN069887>