acl.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * fs/f2fs/acl.h
  4. *
  5. * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  6. * http://www.samsung.com/
  7. *
  8. * Portions of this code from linux/fs/ext2/acl.h
  9. *
  10. * Copyright (C) 2001-2003 Andreas Gruenbacher, <[email protected]>
  11. */
  12. #ifndef __F2FS_ACL_H__
  13. #define __F2FS_ACL_H__
  14. #include <linux/posix_acl_xattr.h>
  15. #define F2FS_ACL_VERSION 0x0001
  16. struct f2fs_acl_entry {
  17. __le16 e_tag;
  18. __le16 e_perm;
  19. __le32 e_id;
  20. };
  21. struct f2fs_acl_entry_short {
  22. __le16 e_tag;
  23. __le16 e_perm;
  24. };
  25. struct f2fs_acl_header {
  26. __le32 a_version;
  27. };
  28. #ifdef CONFIG_F2FS_FS_POSIX_ACL
  29. extern struct posix_acl *f2fs_get_acl(struct inode *, int, bool);
  30. extern int f2fs_set_acl(struct user_namespace *, struct inode *,
  31. struct posix_acl *, int);
  32. extern int f2fs_init_acl(struct inode *, struct inode *, struct page *,
  33. struct page *);
  34. #else
  35. #define f2fs_get_acl NULL
  36. #define f2fs_set_acl NULL
  37. static inline int f2fs_init_acl(struct inode *inode, struct inode *dir,
  38. struct page *ipage, struct page *dpage)
  39. {
  40. return 0;
  41. }
  42. #endif
  43. #endif /* __F2FS_ACL_H__ */