xfs_acl.h 864 B

12345678910111213141516171819202122232425262728293031
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2001-2005 Silicon Graphics, Inc.
  4. * All Rights Reserved.
  5. */
  6. #ifndef __XFS_ACL_H__
  7. #define __XFS_ACL_H__
  8. struct inode;
  9. struct posix_acl;
  10. #ifdef CONFIG_XFS_POSIX_ACL
  11. extern struct posix_acl *xfs_get_acl(struct inode *inode, int type, bool rcu);
  12. extern int xfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
  13. struct posix_acl *acl, int type);
  14. extern int __xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type);
  15. void xfs_forget_acl(struct inode *inode, const char *name);
  16. #else
  17. #define xfs_get_acl NULL
  18. #define xfs_set_acl NULL
  19. static inline int __xfs_set_acl(struct inode *inode, struct posix_acl *acl,
  20. int type)
  21. {
  22. return 0;
  23. }
  24. static inline void xfs_forget_acl(struct inode *inode, const char *name)
  25. {
  26. }
  27. #endif /* CONFIG_XFS_POSIX_ACL */
  28. #endif /* __XFS_ACL_H__ */