xref: /linux/fs/9p/acl.h (revision 4e34e719e457f2e031297175410fc0bd4016a085)
185ff872dSAneesh Kumar K.V /*
285ff872dSAneesh Kumar K.V  * Copyright IBM Corporation, 2010
385ff872dSAneesh Kumar K.V  * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
485ff872dSAneesh Kumar K.V  *
585ff872dSAneesh Kumar K.V  * This program is free software; you can redistribute it and/or modify it
685ff872dSAneesh Kumar K.V  * under the terms of version 2.1 of the GNU Lesser General Public License
785ff872dSAneesh Kumar K.V  * as published by the Free Software Foundation.
885ff872dSAneesh Kumar K.V  *
985ff872dSAneesh Kumar K.V  * This program is distributed in the hope that it would be useful, but
1085ff872dSAneesh Kumar K.V  * WITHOUT ANY WARRANTY; without even the implied warranty of
1185ff872dSAneesh Kumar K.V  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1285ff872dSAneesh Kumar K.V  *
1385ff872dSAneesh Kumar K.V  */
1485ff872dSAneesh Kumar K.V #ifndef FS_9P_ACL_H
1585ff872dSAneesh Kumar K.V #define FS_9P_ACL_H
1685ff872dSAneesh Kumar K.V 
1785ff872dSAneesh Kumar K.V #ifdef CONFIG_9P_FS_POSIX_ACL
1885ff872dSAneesh Kumar K.V extern int v9fs_get_acl(struct inode *, struct p9_fid *);
19*4e34e719SChristoph Hellwig extern struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type);
206e8dc555SAneesh Kumar K.V extern int v9fs_acl_chmod(struct dentry *);
21ad77dbceSAneesh Kumar K.V extern int v9fs_set_create_acl(struct dentry *,
221ec95bf3SAl Viro 			       struct posix_acl **, struct posix_acl **);
23ad77dbceSAneesh Kumar K.V extern int v9fs_acl_mode(struct inode *dir, mode_t *modep,
24ad77dbceSAneesh Kumar K.V 			 struct posix_acl **dpacl, struct posix_acl **pacl);
2585ff872dSAneesh Kumar K.V #else
26*4e34e719SChristoph Hellwig #define v9fs_iop_get_acl NULL
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 }
316e8dc555SAneesh Kumar K.V static inline int v9fs_acl_chmod(struct dentry *dentry)
326e8dc555SAneesh Kumar K.V {
336e8dc555SAneesh Kumar K.V 	return 0;
346e8dc555SAneesh Kumar K.V }
35ad77dbceSAneesh Kumar K.V static inline int v9fs_set_create_acl(struct dentry *dentry,
361ec95bf3SAl Viro 				      struct posix_acl **dpacl,
371ec95bf3SAl Viro 				      struct posix_acl **pacl)
38ad77dbceSAneesh Kumar K.V {
39ad77dbceSAneesh Kumar K.V 	return 0;
40ad77dbceSAneesh Kumar K.V }
41ad77dbceSAneesh Kumar K.V static inline int v9fs_acl_mode(struct inode *dir, mode_t *modep,
42ad77dbceSAneesh Kumar K.V 				struct posix_acl **dpacl,
43ad77dbceSAneesh Kumar K.V 				struct posix_acl **pacl)
44ad77dbceSAneesh Kumar K.V {
45ad77dbceSAneesh Kumar K.V 	return 0;
46ad77dbceSAneesh Kumar K.V }
47ad77dbceSAneesh Kumar K.V 
4885ff872dSAneesh Kumar K.V #endif
4985ff872dSAneesh Kumar K.V #endif /* FS_9P_XATTR_H */
50