Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25578
b: refs/heads/master
c: b905b7b
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Apr 11, 2006
1 parent 511e35c commit 0506050
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 249920527f9e6e5c305538bbf1ea882ee7dc1c06
refs/heads/master: b905b7b0a054d2ab3e0c9304def998546c93f6b5
6 changes: 3 additions & 3 deletions trunk/fs/nfsd/nfs4acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,9 @@ calculate_posix_ace_count(struct nfs4_acl *n4acl)
/* Also, the remaining entries are for named users and
* groups, and come in threes (mask, allow, deny): */
if (n4acl->naces < 7)
return -1;
return -EINVAL;
if ((n4acl->naces - 7) % 3)
return -1;
return -EINVAL;
return 4 + (n4acl->naces - 7)/3;
}
}
Expand Down Expand Up @@ -866,7 +866,7 @@ nfs4_acl_add_ace(struct nfs4_acl *acl, u32 type, u32 flag, u32 access_mask,
struct nfs4_ace *ace;

if ((ace = kmalloc(sizeof(*ace), GFP_KERNEL)) == NULL)
return -1;
return -ENOMEM;

ace->type = type;
ace->flag = flag;
Expand Down
7 changes: 3 additions & 4 deletions trunk/fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,10 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, struct iattr *ia
buf, dummy32, &ace.who);
if (status)
goto out_nfserr;
if (nfs4_acl_add_ace(*acl, ace.type, ace.flag,
ace.access_mask, ace.whotype, ace.who) != 0) {
status = -ENOMEM;
status = nfs4_acl_add_ace(*acl, ace.type, ace.flag,
ace.access_mask, ace.whotype, ace.who);
if (status)
goto out_nfserr;
}
}
} else
*acl = NULL;
Expand Down

0 comments on commit 0506050

Please sign in to comment.