From b695c34ea4ca3037cfbc0fe7a9283334b761abc1 Mon Sep 17 00:00:00 2001 From: Massimo Maggi Date: Sun, 3 Nov 2013 00:40:26 +0100 Subject: Honor CONFIG_FS_POSIX_ACL kernel option The required Posix ACL interfaces are only available for kernels with CONFIG_FS_POSIX_ACL defined. Therefore, only enable Posix ACL support for these kernels. All major distribution kernels enable CONFIG_FS_POSIX_ACL by default. If your kernel does not support Posix ACLs the following warning will be printed at ZFS module load time. "ZFS: Posix ACLs disabled by kernel" Signed-off-by: Massimo Maggi Signed-off-by: Brian Behlendorf Closes #1825 --- module/zfs/zfs_vfsops.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'module/zfs/zfs_vfsops.c') diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 9fc6c6fe1..9097273e4 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -165,8 +165,13 @@ acltype_changed_cb(void *arg, uint64_t newval) zsb->z_sb->s_flags &= ~MS_POSIXACL; break; case ZFS_ACLTYPE_POSIXACL: +#ifdef CONFIG_FS_POSIX_ACL zsb->z_acl_type = ZFS_ACLTYPE_POSIXACL; zsb->z_sb->s_flags |= MS_POSIXACL; +#else + zsb->z_acl_type = ZFS_ACLTYPE_OFF; + zsb->z_sb->s_flags &= ~MS_POSIXACL; +#endif /* CONFIG_FS_POSIX_ACL */ break; default: break; -- cgit v1.2.3