summaryrefslogtreecommitdiffstats
path: root/include/sys/zpl.h
diff options
context:
space:
mode:
authorMassimo Maggi <[email protected]>2013-11-03 00:40:26 +0100
committerBrian Behlendorf <[email protected]>2013-11-05 16:22:05 -0800
commitb695c34ea4ca3037cfbc0fe7a9283334b761abc1 (patch)
tree1b34e3708386e3478ceb157168b1f12c8feed8be /include/sys/zpl.h
parent78e2739d3c9e433c92cd1623a510edb2c83a97d9 (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1825
Diffstat (limited to 'include/sys/zpl.h')
-rw-r--r--include/sys/zpl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sys/zpl.h b/include/sys/zpl.h
index 1e338b1cd..d513785c4 100644
--- a/include/sys/zpl.h
+++ b/include/sys/zpl.h
@@ -71,6 +71,7 @@ extern struct file_system_type zpl_fs_type;
extern ssize_t zpl_xattr_list(struct dentry *dentry, char *buf, size_t size);
extern int zpl_xattr_security_init(struct inode *ip, struct inode *dip,
const struct qstr *qstr);
+#if defined(CONFIG_FS_POSIX_ACL)
extern int zpl_set_acl(struct inode *ip, int type, struct posix_acl *acl);
extern struct posix_acl *zpl_get_acl(struct inode *ip, int type);
#if !defined(HAVE_GET_ACL)
@@ -87,6 +88,19 @@ extern int zpl_permission(struct inode *ip, int mask);
extern int zpl_init_acl(struct inode *ip, struct inode *dir);
extern int zpl_chmod_acl(struct inode *ip);
+#else
+static inline int
+zpl_init_acl(struct inode *ip, struct inode *dir)
+{
+ return (0);
+}
+
+static inline int
+zpl_chmod_acl(struct inode *ip)
+{
+ return (0);
+}
+#endif /* CONFIG_FS_POSIX_ACL */
extern xattr_handler_t *zpl_xattr_handlers[];