#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/posix_acl.h>
#include "nfsfh.h"
#include "nfsd.h"
#include "acl.h"
#include "vfs.h"
#define NFS4_ACL_TYPE_DEFAULT …
#define NFS4_ACL_DIR …
#define NFS4_ACL_OWNER …
#define NFS4_READ_MODE …
#define NFS4_WRITE_MODE …
#define NFS4_EXECUTE_MODE …
#define NFS4_ANYONE_MODE …
#define NFS4_OWNER_MODE …
#define NFS4_INHERITANCE_FLAGS …
#define NFS4_SUPPORTED_FLAGS …
static u32
mask_from_posix(unsigned short perm, unsigned int flags)
{ … }
static u32
deny_mask_from_posix(unsigned short perm, u32 flags)
{ … }
static void
low_mode_from_nfs4(u32 perm, unsigned short *mode, unsigned int flags)
{ … }
static short ace2type(struct nfs4_ace *);
static void _posix_to_nfsv4_one(struct posix_acl *, struct nfs4_acl *,
unsigned int);
int
nfsd4_get_nfs4_acl(struct svc_rqst *rqstp, struct dentry *dentry,
struct nfs4_acl **acl)
{ … }
struct posix_acl_summary { … };
static void
summarize_posix_acl(struct posix_acl *acl, struct posix_acl_summary *pas)
{ … }
static void
_posix_to_nfsv4_one(struct posix_acl *pacl, struct nfs4_acl *acl,
unsigned int flags)
{ … }
static bool
pace_gt(struct posix_acl_entry *pace1, struct posix_acl_entry *pace2)
{ … }
static void
sort_pacl_range(struct posix_acl *pacl, int start, int end) { … }
static void
sort_pacl(struct posix_acl *pacl)
{ … }
struct posix_ace_state { … };
struct posix_user_ace_state { … };
struct posix_ace_state_array { … };
struct posix_acl_state { … };
static int
init_state(struct posix_acl_state *state, int cnt)
{ … }
static void
free_state(struct posix_acl_state *state) { … }
static inline void add_to_mask(struct posix_acl_state *state, struct posix_ace_state *astate)
{ … }
static struct posix_acl *
posix_state_to_acl(struct posix_acl_state *state, unsigned int flags)
{ … }
static inline void allow_bits(struct posix_ace_state *astate, u32 mask)
{ … }
static inline void deny_bits(struct posix_ace_state *astate, u32 mask)
{ … }
static int find_uid(struct posix_acl_state *state, kuid_t uid)
{ … }
static int find_gid(struct posix_acl_state *state, kgid_t gid)
{ … }
static void deny_bits_array(struct posix_ace_state_array *a, u32 mask)
{ … }
static void allow_bits_array(struct posix_ace_state_array *a, u32 mask)
{ … }
static void process_one_v4_ace(struct posix_acl_state *state,
struct nfs4_ace *ace)
{ … }
static int nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl,
struct posix_acl **pacl, struct posix_acl **dpacl,
unsigned int flags)
{ … }
__be32 nfsd4_acl_to_attr(enum nfs_ftype4 type, struct nfs4_acl *acl,
struct nfsd_attrs *attr)
{ … }
static short
ace2type(struct nfs4_ace *ace)
{ … }
int nfs4_acl_bytes(int entries)
{ … }
static struct { … } s2t_map[] = …;
int
nfs4_acl_get_whotype(char *p, u32 len)
{ … }
__be32 nfs4_acl_write_who(struct xdr_stream *xdr, int who)
{ … }