Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: LGPL-2.1 */
0002 /*
0003  * Copyright IBM Corporation, 2010
0004  * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
0005  */
0006 #ifndef FS_9P_ACL_H
0007 #define FS_9P_ACL_H
0008 
0009 #ifdef CONFIG_9P_FS_POSIX_ACL
0010 int v9fs_get_acl(struct inode *inode, struct p9_fid *fid);
0011 struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type,
0012                    bool rcu);
0013 int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid);
0014 int v9fs_set_create_acl(struct inode *inode, struct p9_fid *fid,
0015             struct posix_acl *dacl, struct posix_acl *acl);
0016 int v9fs_acl_mode(struct inode *dir, umode_t *modep,
0017           struct posix_acl **dpacl, struct posix_acl **pacl);
0018 void v9fs_put_acl(struct posix_acl *dacl, struct posix_acl *acl);
0019 #else
0020 #define v9fs_iop_get_acl NULL
0021 static inline int v9fs_get_acl(struct inode *inode, struct p9_fid *fid)
0022 {
0023     return 0;
0024 }
0025 static inline int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid)
0026 {
0027     return 0;
0028 }
0029 static inline int v9fs_set_create_acl(struct inode *inode,
0030                       struct p9_fid *fid,
0031                       struct posix_acl *dacl,
0032                       struct posix_acl *acl)
0033 {
0034     return 0;
0035 }
0036 static inline void v9fs_put_acl(struct posix_acl *dacl,
0037                 struct posix_acl *acl)
0038 {
0039 }
0040 static inline int v9fs_acl_mode(struct inode *dir, umode_t *modep,
0041                 struct posix_acl **dpacl,
0042                 struct posix_acl **pacl)
0043 {
0044     return 0;
0045 }
0046 
0047 #endif
0048 #endif /* FS_9P_XATTR_H */