Lines Matching refs:pacl
131 nfs4_acl_posix_to_nfsv4(struct posix_acl *pacl, struct posix_acl *dpacl,
137 if (pacl) {
138 if (posix_acl_valid(pacl) < 0)
140 size += 2*pacl->a_count;
153 if (pacl)
154 _posix_to_nfsv4_one(pacl, acl, flags & ~NFS4_ACL_TYPE_DEFAULT);
216 _posix_to_nfsv4_one(struct posix_acl *pacl, struct nfs4_acl *acl,
226 BUG_ON(pacl->a_count < 3);
227 summarize_posix_acl(pacl, &pas);
229 pa = pacl->a_entries;
346 sort_pacl_range(struct posix_acl *pacl, int start, int end) {
355 if (pacl->a_entries[i].e_id
356 > pacl->a_entries[i+1].e_id) {
358 tmp = pacl->a_entries[i];
359 pacl->a_entries[i] = pacl->a_entries[i+1];
360 pacl->a_entries[i+1] = tmp;
367 sort_pacl(struct posix_acl *pacl)
373 if (pacl->a_count <= 4)
376 while (pacl->a_entries[i].e_tag == ACL_USER)
378 sort_pacl_range(pacl, 1, i-1);
380 BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ);
382 while (pacl->a_entries[j].e_tag == ACL_GROUP)
384 sort_pacl_range(pacl, i, j-1);
492 struct posix_acl *pacl;
502 pacl = posix_acl_alloc(0, GFP_KERNEL);
503 return pacl ? pacl : ERR_PTR(-ENOMEM);
511 pacl = posix_acl_alloc(nace, GFP_KERNEL);
512 if (!pacl)
515 pace = pacl->a_entries;
569 return pacl;
571 posix_acl_release(pacl);
690 int nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl,
726 *pacl = posix_state_to_acl(&effective_acl_state, flags);
727 if (IS_ERR(*pacl)) {
728 ret = PTR_ERR(*pacl);
729 *pacl = NULL;
737 posix_acl_release(*pacl);
738 *pacl = NULL;
741 sort_pacl(*pacl);