mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
Merge 3.15 bugfix for 3.16
This commit is contained in:
commit
dd15073a26
1 changed files with 9 additions and 8 deletions
|
@ -401,8 +401,10 @@ sort_pacl(struct posix_acl *pacl)
|
||||||
* by uid/gid. */
|
* by uid/gid. */
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (pacl->a_count <= 4)
|
/* no users or groups */
|
||||||
return; /* no users or groups */
|
if (!pacl || pacl->a_count <= 4)
|
||||||
|
return;
|
||||||
|
|
||||||
i = 1;
|
i = 1;
|
||||||
while (pacl->a_entries[i].e_tag == ACL_USER)
|
while (pacl->a_entries[i].e_tag == ACL_USER)
|
||||||
i++;
|
i++;
|
||||||
|
@ -529,13 +531,12 @@ posix_state_to_acl(struct posix_acl_state *state, unsigned int flags)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ACLs with no ACEs are treated differently in the inheritable
|
* ACLs with no ACEs are treated differently in the inheritable
|
||||||
* and effective cases: when there are no inheritable ACEs, we
|
* and effective cases: when there are no inheritable ACEs,
|
||||||
* set a zero-length default posix acl:
|
* calls ->set_acl with a NULL ACL structure.
|
||||||
*/
|
*/
|
||||||
if (state->empty && (flags & NFS4_ACL_TYPE_DEFAULT)) {
|
if (state->empty && (flags & NFS4_ACL_TYPE_DEFAULT))
|
||||||
pacl = posix_acl_alloc(0, GFP_KERNEL);
|
return NULL;
|
||||||
return pacl ? pacl : ERR_PTR(-ENOMEM);
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* When there are no effective ACEs, the following will end
|
* When there are no effective ACEs, the following will end
|
||||||
* up setting a 3-element effective posix ACL with all
|
* up setting a 3-element effective posix ACL with all
|
||||||
|
|
Loading…
Reference in a new issue