From owner-svn-src-head@freebsd.org Sun Jun 11 19:05:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F41E1D8CE8D; Sun, 11 Jun 2017 19:05:46 +0000 (UTC) (envelope-from pfg@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 mx1.freebsd.org (Postfix) with ESMTPS id CD8A0736D0; Sun, 11 Jun 2017 19:05:46 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5BJ5k5k039329; Sun, 11 Jun 2017 19:05:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5BJ5jrC039327; Sun, 11 Jun 2017 19:05:45 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706111905.v5BJ5jrC039327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 11 Jun 2017 19:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319827 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 11 Jun 2017 19:05:47 -0000 Author: pfg Date: Sun Jun 11 19:05:45 2017 New Revision: 319827 URL: https://svnweb.freebsd.org/changeset/base/319827 Log: extfs: fix the build with no UFS_ACL. Some people may want to drop UFS-style ACLs for slimmer kernels. Let's just not assume everyone needs ACLs. Reported by: bde Submitted by: Fedor Uporov Differential Revision: https://reviews.freebsd.org/D11145 Modified: head/sys/fs/ext2fs/ext2_acl.c head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_acl.c ============================================================================== --- head/sys/fs/ext2fs/ext2_acl.c Sun Jun 11 16:54:04 2017 (r319826) +++ head/sys/fs/ext2fs/ext2_acl.c Sun Jun 11 19:05:45 2017 (r319827) @@ -49,6 +49,8 @@ #include #include +#ifdef UFS_ACL + void ext2_sync_acl_from_inode(struct inode *ip, struct acl *acl) { @@ -522,3 +524,5 @@ ext2_aclcheck(struct vop_aclcheck_args *ap) return (acl_posix1e_check(ap->a_aclp)); } + +#endif /* UFS_ACL */ Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Sun Jun 11 16:54:04 2017 (r319826) +++ head/sys/fs/ext2fs/ext2_vnops.c Sun Jun 11 19:05:45 2017 (r319827) @@ -164,9 +164,11 @@ struct vop_vector ext2_vnodeops = { .vop_getextattr = ext2_getextattr, .vop_listextattr = ext2_listextattr, .vop_setextattr = ext2_setextattr, +#ifdef UFS_ACL .vop_getacl = ext2_getacl, .vop_setacl = ext2_setacl, .vop_aclcheck = ext2_aclcheck, +#endif /* UFS_ACL */ .vop_vptofh = ext2_vptofh, }; @@ -1087,6 +1089,7 @@ out: return (error); } +#ifdef UFS_ACL static int ext2_do_posix1e_acl_inheritance_dir(struct vnode *dvp, struct vnode *tvp, mode_t dmode, struct ucred *cred, struct thread *td) @@ -1231,6 +1234,8 @@ out: return (error); } +#endif /* UFS_ACL */ + /* * Mkdir system call */ @@ -1340,6 +1345,7 @@ ext2_mkdir(struct vop_mkdir_args *ap) ip->i_flag |= IN_CHANGE; } +#ifdef UFS_ACL if (dvp->v_mount->mnt_flag & MNT_ACLS) { error = ext2_do_posix1e_acl_inheritance_dir(dvp, tvp, dmode, cnp->cn_cred, cnp->cn_thread); @@ -1347,6 +1353,8 @@ ext2_mkdir(struct vop_mkdir_args *ap) goto bad; } +#endif /* UFS_ACL */ + /* Directory set up, now install its entry in the parent directory. */ error = ext2_direnter(ip, dvp, cnp); if (error) { @@ -1601,6 +1609,8 @@ ext2_pathconf(struct vop_pathconf_args *ap) case _PC_NO_TRUNC: *ap->a_retval = 1; break; + +#ifdef UFS_ACL case _PC_ACL_EXTENDED: if (ap->a_vp->v_mount->mnt_flag & MNT_ACLS) *ap->a_retval = 1; @@ -1613,6 +1623,8 @@ ext2_pathconf(struct vop_pathconf_args *ap) else *ap->a_retval = 3; break; +#endif /* UFS_ACL */ + case _PC_MIN_HOLE_SIZE: *ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize; break; @@ -1927,12 +1939,14 @@ ext2_makeinode(int mode, struct vnode *dvp, struct vno if (error) goto bad; +#ifdef UFS_ACL if (dvp->v_mount->mnt_flag & MNT_ACLS) { error = ext2_do_posix1e_acl_inheritance_file(dvp, tvp, mode, cnp->cn_cred, cnp->cn_thread); if (error) goto bad; } +#endif /* UFS_ACL */ error = ext2_direnter(ip, dvp, cnp); if (error)