1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_ACL_H
3 #define _BCACHEFS_ACL_H
5 struct bch_inode_unpacked;
10 #ifdef CONFIG_BCACHEFS_POSIX_ACL
12 #define BCH_ACL_VERSION 0x0001
23 } bch_acl_entry_short;
29 struct posix_acl *bch2_get_acl(struct inode *, int);
31 int bch2_set_acl_trans(struct btree_trans *,
32 struct bch_inode_unpacked *,
33 const struct bch_hash_info *,
34 struct posix_acl *, int);
35 int bch2_set_acl(struct inode *, struct posix_acl *, int);
36 int bch2_acl_chmod(struct btree_trans *, struct bch_inode_info *,
37 umode_t, struct posix_acl **);
41 static inline int bch2_set_acl_trans(struct btree_trans *trans,
42 struct bch_inode_unpacked *inode_u,
43 const struct bch_hash_info *hash_info,
44 struct posix_acl *acl, int type)
49 static inline int bch2_acl_chmod(struct btree_trans *trans,
50 struct bch_inode_info *inode,
52 struct posix_acl **new_acl)
57 #endif /* CONFIG_BCACHEFS_POSIX_ACL */
59 #endif /* _BCACHEFS_ACL_H */