acl.h 793 B

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