18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright IBM Corporation, 2010
38c2ecf20Sopenharmony_ci * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify it
68c2ecf20Sopenharmony_ci * under the terms of version 2.1 of the GNU Lesser General Public License
78c2ecf20Sopenharmony_ci * as published by the Free Software Foundation.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * This program is distributed in the hope that it would be useful, but
108c2ecf20Sopenharmony_ci * WITHOUT ANY WARRANTY; without even the implied warranty of
118c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci */
148c2ecf20Sopenharmony_ci#ifndef FS_9P_ACL_H
158c2ecf20Sopenharmony_ci#define FS_9P_ACL_H
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#ifdef CONFIG_9P_FS_POSIX_ACL
188c2ecf20Sopenharmony_ciextern int v9fs_get_acl(struct inode *, struct p9_fid *);
198c2ecf20Sopenharmony_ciextern struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type);
208c2ecf20Sopenharmony_ciextern int v9fs_acl_chmod(struct inode *, struct p9_fid *);
218c2ecf20Sopenharmony_ciextern int v9fs_set_create_acl(struct inode *, struct p9_fid *,
228c2ecf20Sopenharmony_ci			       struct posix_acl *, struct posix_acl *);
238c2ecf20Sopenharmony_ciextern int v9fs_acl_mode(struct inode *dir, umode_t *modep,
248c2ecf20Sopenharmony_ci			 struct posix_acl **dpacl, struct posix_acl **pacl);
258c2ecf20Sopenharmony_ciextern void v9fs_put_acl(struct posix_acl *dacl, struct posix_acl *acl);
268c2ecf20Sopenharmony_ci#else
278c2ecf20Sopenharmony_ci#define v9fs_iop_get_acl NULL
288c2ecf20Sopenharmony_cistatic inline int v9fs_get_acl(struct inode *inode, struct p9_fid *fid)
298c2ecf20Sopenharmony_ci{
308c2ecf20Sopenharmony_ci	return 0;
318c2ecf20Sopenharmony_ci}
328c2ecf20Sopenharmony_cistatic inline int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid)
338c2ecf20Sopenharmony_ci{
348c2ecf20Sopenharmony_ci	return 0;
358c2ecf20Sopenharmony_ci}
368c2ecf20Sopenharmony_cistatic inline int v9fs_set_create_acl(struct inode *inode,
378c2ecf20Sopenharmony_ci				      struct p9_fid *fid,
388c2ecf20Sopenharmony_ci				      struct posix_acl *dacl,
398c2ecf20Sopenharmony_ci				      struct posix_acl *acl)
408c2ecf20Sopenharmony_ci{
418c2ecf20Sopenharmony_ci	return 0;
428c2ecf20Sopenharmony_ci}
438c2ecf20Sopenharmony_cistatic inline void v9fs_put_acl(struct posix_acl *dacl,
448c2ecf20Sopenharmony_ci				struct posix_acl *acl)
458c2ecf20Sopenharmony_ci{
468c2ecf20Sopenharmony_ci}
478c2ecf20Sopenharmony_cistatic inline int v9fs_acl_mode(struct inode *dir, umode_t *modep,
488c2ecf20Sopenharmony_ci				struct posix_acl **dpacl,
498c2ecf20Sopenharmony_ci				struct posix_acl **pacl)
508c2ecf20Sopenharmony_ci{
518c2ecf20Sopenharmony_ci	return 0;
528c2ecf20Sopenharmony_ci}
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci#endif
558c2ecf20Sopenharmony_ci#endif /* FS_9P_XATTR_H */
56