Lines Matching refs:pacl
134 struct posix_acl *pacl = NULL, *dpacl = NULL; in nfsd4_get_nfs4_acl() local
138 pacl = get_acl(inode, ACL_TYPE_ACCESS); in nfsd4_get_nfs4_acl()
139 if (!pacl) in nfsd4_get_nfs4_acl()
140 pacl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfsd4_get_nfs4_acl()
142 if (IS_ERR(pacl)) in nfsd4_get_nfs4_acl()
143 return PTR_ERR(pacl); in nfsd4_get_nfs4_acl()
146 size += 2 * pacl->a_count; in nfsd4_get_nfs4_acl()
167 _posix_to_nfsv4_one(pacl, *acl, flags & ~NFS4_ACL_TYPE_DEFAULT); in nfsd4_get_nfs4_acl()
175 posix_acl_release(pacl); in nfsd4_get_nfs4_acl()
233 _posix_to_nfsv4_one(struct posix_acl *pacl, struct nfs4_acl *acl, in _posix_to_nfsv4_one() argument
243 BUG_ON(pacl->a_count < 3); in _posix_to_nfsv4_one()
244 summarize_posix_acl(pacl, &pas); in _posix_to_nfsv4_one()
246 pa = pacl->a_entries; in _posix_to_nfsv4_one()
375 sort_pacl_range(struct posix_acl *pacl, int start, int end) { in sort_pacl_range() argument
383 if (pace_gt(&pacl->a_entries[i], in sort_pacl_range()
384 &pacl->a_entries[i+1])) { in sort_pacl_range()
386 swap(pacl->a_entries[i], in sort_pacl_range()
387 pacl->a_entries[i + 1]); in sort_pacl_range()
394 sort_pacl(struct posix_acl *pacl) in sort_pacl() argument
401 if (!pacl || pacl->a_count <= 4) in sort_pacl()
405 while (pacl->a_entries[i].e_tag == ACL_USER) in sort_pacl()
407 sort_pacl_range(pacl, 1, i-1); in sort_pacl()
409 BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ); in sort_pacl()
411 while (pacl->a_entries[j].e_tag == ACL_GROUP) in sort_pacl()
413 sort_pacl_range(pacl, i, j-1); in sort_pacl()
494 struct posix_acl *pacl; in posix_state_to_acl() local
515 pacl = posix_acl_alloc(nace, GFP_KERNEL); in posix_state_to_acl()
516 if (!pacl) in posix_state_to_acl()
519 pace = pacl->a_entries; in posix_state_to_acl()
556 return pacl; in posix_state_to_acl()
693 struct posix_acl **pacl, struct posix_acl **dpacl, in nfs4_acl_nfsv4_to_posix() argument
729 *pacl = posix_state_to_acl(&effective_acl_state, flags); in nfs4_acl_nfsv4_to_posix()
730 if (IS_ERR(*pacl)) { in nfs4_acl_nfsv4_to_posix()
731 ret = PTR_ERR(*pacl); in nfs4_acl_nfsv4_to_posix()
732 *pacl = NULL; in nfs4_acl_nfsv4_to_posix()
740 posix_acl_release(*pacl); in nfs4_acl_nfsv4_to_posix()
741 *pacl = NULL; in nfs4_acl_nfsv4_to_posix()
744 sort_pacl(*pacl); in nfs4_acl_nfsv4_to_posix()