acl.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * fs/f2fs/acl.h
  3. *
  4. * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  5. * http://www.samsung.com/
  6. *
  7. * Portions of this code from linux/fs/ext2/acl.h
  8. *
  9. * Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de>
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. */
  15. #ifndef __F2FS_ACL_H__
  16. #define __F2FS_ACL_H__
  17. #include <linux/posix_acl_xattr.h>
  18. #define F2FS_ACL_VERSION 0x0001
  19. struct f2fs_acl_entry {
  20. __le16 e_tag;
  21. __le16 e_perm;
  22. __le32 e_id;
  23. };
  24. struct f2fs_acl_entry_short {
  25. __le16 e_tag;
  26. __le16 e_perm;
  27. };
  28. struct f2fs_acl_header {
  29. __le32 a_version;
  30. };
  31. #ifdef CONFIG_F2FS_FS_POSIX_ACL
  32. extern struct posix_acl *f2fs_get_acl(struct inode *, int);
  33. extern int f2fs_acl_chmod(struct inode *);
  34. extern int f2fs_init_acl(struct inode *, struct inode *, struct page *,
  35. struct page *);
  36. #else
  37. #define f2fs_get_acl NULL
  38. #define f2fs_set_acl NULL
  39. static inline int f2fs_acl_chmod(struct inode *inode)
  40. {
  41. return 0;
  42. }
  43. static inline int f2fs_init_acl(struct inode *inode, struct inode *dir,
  44. struct page *ipage, struct page *dpage)
  45. {
  46. return 0;
  47. }
  48. #endif
  49. #endif /* __F2FS_ACL_H__ */