1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #ifndef BTRFS_ACL_H
4 #define BTRFS_ACL_H
5 
6 #include <linux/types.h>
7 
8 struct posix_acl;
9 struct inode;
10 struct btrfs_trans_handle;
11 
12 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
13 
14 struct mnt_idmap;
15 struct dentry;
16 
17 struct posix_acl *btrfs_get_acl(struct inode *inode, int type, bool rcu);
18 int btrfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
19 		  struct posix_acl *acl, int type);
20 int __btrfs_set_acl(struct btrfs_trans_handle *trans, struct inode *inode,
21 		    struct posix_acl *acl, int type);
22 
23 #else
24 
25 #include <linux/errno.h>
26 
27 struct btrfs_trans_handle;
28 
29 #define btrfs_get_acl NULL
30 #define btrfs_set_acl NULL
31 static inline int __btrfs_set_acl(struct btrfs_trans_handle *trans,
32 				  struct inode *inode, struct posix_acl *acl,
33 				  int type)
34 {
35 	return -EOPNOTSUPP;
36 }
37 
38 #endif
39 
40 #endif
41