Linux 6.13-rc4
[linux.git] / fs / btrfs / acl.h
blob48b9ddae4a46a7d522055ffc95dfdd0c52a62472
1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef BTRFS_ACL_H
4 #define BTRFS_ACL_H
6 struct posix_acl;
7 struct inode;
8 struct btrfs_trans_handle;
10 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
12 struct mnt_idmap;
13 struct dentry;
15 struct posix_acl *btrfs_get_acl(struct inode *inode, int type, bool rcu);
16 int btrfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
17 struct posix_acl *acl, int type);
18 int __btrfs_set_acl(struct btrfs_trans_handle *trans, struct inode *inode,
19 struct posix_acl *acl, int type);
21 #else
23 #include <linux/errno.h>
25 struct btrfs_trans_handle;
27 #define btrfs_get_acl NULL
28 #define btrfs_set_acl NULL
29 static inline int __btrfs_set_acl(struct btrfs_trans_handle *trans,
30 struct inode *inode, struct posix_acl *acl,
31 int type)
33 return -EOPNOTSUPP;
36 #endif
38 #endif