1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * acl.h 4 * 5 * Copyright (C) 2004, 2008 Oracle. All rights reserved. 6 */ 7 8 #ifndef OCFS2_ACL_H 9 #define OCFS2_ACL_H 10 11 #include <linux/posix_acl_xattr.h> 12 13 struct ocfs2_acl_entry { 14 __le16 e_tag; 15 __le16 e_perm; 16 __le32 e_id; 17 }; 18 19 struct posix_acl *ocfs2_iop_get_acl(struct inode *inode, int type, bool rcu); 20 int ocfs2_iop_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, 21 struct posix_acl *acl, int type); 22 extern int ocfs2_acl_chmod(struct inode *, struct buffer_head *); 23 struct ocfs2_acl_state { 24 struct posix_acl *default_acl; 25 struct posix_acl *acl; 26 umode_t mode; 27 }; 28 29 int ocfs2_acl_init_prepare(struct inode *inode, struct inode *dir, 30 struct buffer_head *dir_bh, 31 struct ocfs2_acl_state *state); 32 void ocfs2_acl_init_release(struct ocfs2_acl_state *state); 33 int ocfs2_init_acl(handle_t *handle, struct inode *inode, 34 struct buffer_head *di_bh, 35 struct ocfs2_alloc_context *meta_ac, 36 struct ocfs2_alloc_context *data_ac, 37 struct ocfs2_acl_state *state); 38 39 #endif /* OCFS2_ACL_H */ 40