acl.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* SPDX-License-Identifier: LGPL-2.1 */
  2. /*
  3. * Copyright IBM Corporation, 2010
  4. * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
  5. */
  6. #ifndef FS_9P_ACL_H
  7. #define FS_9P_ACL_H
  8. #ifdef CONFIG_9P_FS_POSIX_ACL
  9. int v9fs_get_acl(struct inode *inode, struct p9_fid *fid);
  10. struct posix_acl *v9fs_iop_get_inode_acl(struct inode *inode, int type,
  11. bool rcu);
  12. struct posix_acl *v9fs_iop_get_acl(struct mnt_idmap *idmap,
  13. struct dentry *dentry, int type);
  14. int v9fs_iop_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
  15. struct posix_acl *acl, int type);
  16. int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid);
  17. int v9fs_set_create_acl(struct inode *inode, struct p9_fid *fid,
  18. struct posix_acl *dacl, struct posix_acl *acl);
  19. int v9fs_acl_mode(struct inode *dir, umode_t *modep,
  20. struct posix_acl **dpacl, struct posix_acl **pacl);
  21. void v9fs_put_acl(struct posix_acl *dacl, struct posix_acl *acl);
  22. #else
  23. #define v9fs_iop_get_inode_acl NULL
  24. #define v9fs_iop_get_acl NULL
  25. #define v9fs_iop_set_acl NULL
  26. static inline int v9fs_get_acl(struct inode *inode, struct p9_fid *fid)
  27. {
  28. return 0;
  29. }
  30. static inline int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid)
  31. {
  32. return 0;
  33. }
  34. static inline int v9fs_set_create_acl(struct inode *inode,
  35. struct p9_fid *fid,
  36. struct posix_acl *dacl,
  37. struct posix_acl *acl)
  38. {
  39. return 0;
  40. }
  41. static inline void v9fs_put_acl(struct posix_acl *dacl,
  42. struct posix_acl *acl)
  43. {
  44. }
  45. static inline int v9fs_acl_mode(struct inode *dir, umode_t *modep,
  46. struct posix_acl **dpacl,
  47. struct posix_acl **pacl)
  48. {
  49. return 0;
  50. }
  51. #endif
  52. #endif /* FS_9P_XATTR_H */