xref: /openbmc/linux/fs/btrfs/acl.h (revision 33cf97a7b6585efc57c1277b9e346afa7c542999)
1*33cf97a7SJosef Bacik /* SPDX-License-Identifier: GPL-2.0 */
2*33cf97a7SJosef Bacik 
3*33cf97a7SJosef Bacik #ifndef BTRFS_ACL_H
4*33cf97a7SJosef Bacik #define BTRFS_ACL_H
5*33cf97a7SJosef Bacik 
6*33cf97a7SJosef Bacik #ifdef CONFIG_BTRFS_FS_POSIX_ACL
7*33cf97a7SJosef Bacik 
8*33cf97a7SJosef Bacik struct posix_acl *btrfs_get_acl(struct inode *inode, int type, bool rcu);
9*33cf97a7SJosef Bacik int btrfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
10*33cf97a7SJosef Bacik 		  struct posix_acl *acl, int type);
11*33cf97a7SJosef Bacik int __btrfs_set_acl(struct btrfs_trans_handle *trans, struct inode *inode,
12*33cf97a7SJosef Bacik 		    struct posix_acl *acl, int type);
13*33cf97a7SJosef Bacik 
14*33cf97a7SJosef Bacik #else
15*33cf97a7SJosef Bacik 
16*33cf97a7SJosef Bacik #define btrfs_get_acl NULL
17*33cf97a7SJosef Bacik #define btrfs_set_acl NULL
18*33cf97a7SJosef Bacik static inline int __btrfs_set_acl(struct btrfs_trans_handle *trans,
19*33cf97a7SJosef Bacik 				  struct inode *inode, struct posix_acl *acl,
20*33cf97a7SJosef Bacik 				  int type)
21*33cf97a7SJosef Bacik {
22*33cf97a7SJosef Bacik 	return -EOPNOTSUPP;
23*33cf97a7SJosef Bacik }
24*33cf97a7SJosef Bacik 
25*33cf97a7SJosef Bacik #endif
26*33cf97a7SJosef Bacik 
27*33cf97a7SJosef Bacik #endif
28