xref: /linux/fs/9p/acl.h (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
1024b7d6aSDominique Martinet /* SPDX-License-Identifier: LGPL-2.1 */
285ff872dSAneesh Kumar K.V /*
385ff872dSAneesh Kumar K.V  * Copyright IBM Corporation, 2010
485ff872dSAneesh Kumar K.V  * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
585ff872dSAneesh Kumar K.V  */
685ff872dSAneesh Kumar K.V #ifndef FS_9P_ACL_H
785ff872dSAneesh Kumar K.V #define FS_9P_ACL_H
885ff872dSAneesh Kumar K.V 
985ff872dSAneesh Kumar K.V #ifdef CONFIG_9P_FS_POSIX_ACL
106e195b0fSDominique Martinet int v9fs_get_acl(struct inode *inode, struct p9_fid *fid);
116cd4d4e8SChristian Brauner struct posix_acl *v9fs_iop_get_inode_acl(struct inode *inode, int type,
126e195b0fSDominique Martinet 				   bool rcu);
1377435322SChristian Brauner struct posix_acl *v9fs_iop_get_acl(struct mnt_idmap *idmap,
146cd4d4e8SChristian Brauner 					  struct dentry *dentry, int type);
15*13e83a49SChristian Brauner int v9fs_iop_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
16079da629SChristian Brauner 		     struct posix_acl *acl, int type);
176e195b0fSDominique Martinet int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid);
186e195b0fSDominique Martinet int v9fs_set_create_acl(struct inode *inode, struct p9_fid *fid,
196e195b0fSDominique Martinet 			struct posix_acl *dacl, struct posix_acl *acl);
206e195b0fSDominique Martinet int v9fs_acl_mode(struct inode *dir, umode_t *modep,
21ad77dbceSAneesh Kumar K.V 		  struct posix_acl **dpacl, struct posix_acl **pacl);
226e195b0fSDominique Martinet void v9fs_put_acl(struct posix_acl *dacl, struct posix_acl *acl);
2385ff872dSAneesh Kumar K.V #else
246cd4d4e8SChristian Brauner #define v9fs_iop_get_inode_acl	NULL
254e34e719SChristoph Hellwig #define v9fs_iop_get_acl NULL
26079da629SChristian Brauner #define v9fs_iop_set_acl NULL
v9fs_get_acl(struct inode * inode,struct p9_fid * fid)2785ff872dSAneesh Kumar K.V static inline int v9fs_get_acl(struct inode *inode, struct p9_fid *fid)
2885ff872dSAneesh Kumar K.V {
2985ff872dSAneesh Kumar K.V 	return 0;
3085ff872dSAneesh Kumar K.V }
v9fs_acl_chmod(struct inode * inode,struct p9_fid * fid)31be308f07SAl Viro static inline int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid)
326e8dc555SAneesh Kumar K.V {
336e8dc555SAneesh Kumar K.V 	return 0;
346e8dc555SAneesh Kumar K.V }
v9fs_set_create_acl(struct inode * inode,struct p9_fid * fid,struct posix_acl * dacl,struct posix_acl * acl)353592ac44SAl Viro static inline int v9fs_set_create_acl(struct inode *inode,
363592ac44SAl Viro 				      struct p9_fid *fid,
375fa6300aSAl Viro 				      struct posix_acl *dacl,
385fa6300aSAl Viro 				      struct posix_acl *acl)
39ad77dbceSAneesh Kumar K.V {
40ad77dbceSAneesh Kumar K.V 	return 0;
41ad77dbceSAneesh Kumar K.V }
v9fs_put_acl(struct posix_acl * dacl,struct posix_acl * acl)425fa6300aSAl Viro static inline void v9fs_put_acl(struct posix_acl *dacl,
435fa6300aSAl Viro 				struct posix_acl *acl)
445fa6300aSAl Viro {
455fa6300aSAl Viro }
v9fs_acl_mode(struct inode * dir,umode_t * modep,struct posix_acl ** dpacl,struct posix_acl ** pacl)46d3fb6120SAl Viro static inline int v9fs_acl_mode(struct inode *dir, umode_t *modep,
47ad77dbceSAneesh Kumar K.V 				struct posix_acl **dpacl,
48ad77dbceSAneesh Kumar K.V 				struct posix_acl **pacl)
49ad77dbceSAneesh Kumar K.V {
50ad77dbceSAneesh Kumar K.V 	return 0;
51ad77dbceSAneesh Kumar K.V }
52ad77dbceSAneesh Kumar K.V 
5385ff872dSAneesh Kumar K.V #endif
5485ff872dSAneesh Kumar K.V #endif /* FS_9P_XATTR_H */
55