From owner-svn-src-head@freebsd.org Mon Mar 11 20:40:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8959152DE48; Mon, 11 Mar 2019 20:40:58 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CE0D82B1C; Mon, 11 Mar 2019 20:40:58 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33BA118055; Mon, 11 Mar 2019 20:40:58 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BKevm1002530; Mon, 11 Mar 2019 20:40:57 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BKevsV002523; Mon, 11 Mar 2019 20:40:57 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201903112040.x2BKevsV002523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Mon, 11 Mar 2019 20:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345024 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nandfs fs/nfsclient kern ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nandfs fs/nfsclient kern ufs/ufs X-SVN-Commit-Revision: 345024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5CE0D82B1C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 20:40:59 -0000 Author: sjg Date: Mon Mar 11 20:40:56 2019 New Revision: 345024 URL: https://svnweb.freebsd.org/changeset/base/345024 Log: Add _PC_ACL_* to vop_stdpathconf This avoid EINVAL from tmpfs etc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D19512 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/fs/nandfs/nandfs_vnops.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/kern/vfs_default.c head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Mar 11 20:40:56 2019 (r345024) @@ -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: head/sys/fs/nandfs/nandfs_vnops.c ============================================================================== --- head/sys/fs/nandfs/nandfs_vnops.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/fs/nandfs/nandfs_vnops.c Mon Mar 11 20:40:56 2019 (r345024) @@ -2258,9 +2258,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: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Mar 11 20:40:56 2019 (r345024) @@ -3511,9 +3511,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)) @@ -3526,9 +3523,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: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/kern/vfs_default.c Mon Mar 11 20:40:56 2019 (r345024) @@ -482,6 +482,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: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Mar 11 20:40:56 2019 (r345024) @@ -2421,28 +2421,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)) @@ -2453,16 +2445,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;