diff options
author | NeilBrown <neilb@suse.de> | 2006-04-11 01:55:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 09:18:51 -0400 |
commit | b905b7b0a054d2ab3e0c9304def998546c93f6b5 (patch) | |
tree | 688aaf8ee7840072a1ea7b4b299068d6e33a1840 /fs/nfsd/nfs4acl.c | |
parent | 249920527f9e6e5c305538bbf1ea882ee7dc1c06 (diff) |
[PATCH] knfsd: nfsd4: better nfs4acl errors
We're returning -1 in a few places in the NFSv4<->POSIX acl translation code
where we could return a reasonable error.
Also allows some minor simplification elsewhere.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4acl.c')
-rw-r--r-- | fs/nfsd/nfs4acl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 63818a51c05c..edb107e61b91 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c | |||
@@ -710,9 +710,9 @@ calculate_posix_ace_count(struct nfs4_acl *n4acl) | |||
710 | /* Also, the remaining entries are for named users and | 710 | /* Also, the remaining entries are for named users and |
711 | * groups, and come in threes (mask, allow, deny): */ | 711 | * groups, and come in threes (mask, allow, deny): */ |
712 | if (n4acl->naces < 7) | 712 | if (n4acl->naces < 7) |
713 | return -1; | 713 | return -EINVAL; |
714 | if ((n4acl->naces - 7) % 3) | 714 | if ((n4acl->naces - 7) % 3) |
715 | return -1; | 715 | return -EINVAL; |
716 | return 4 + (n4acl->naces - 7)/3; | 716 | return 4 + (n4acl->naces - 7)/3; |
717 | } | 717 | } |
718 | } | 718 | } |
@@ -866,7 +866,7 @@ nfs4_acl_add_ace(struct nfs4_acl *acl, u32 type, u32 flag, u32 access_mask, | |||
866 | struct nfs4_ace *ace; | 866 | struct nfs4_ace *ace; |
867 | 867 | ||
868 | if ((ace = kmalloc(sizeof(*ace), GFP_KERNEL)) == NULL) | 868 | if ((ace = kmalloc(sizeof(*ace), GFP_KERNEL)) == NULL) |
869 | return -1; | 869 | return -ENOMEM; |
870 | 870 | ||
871 | ace->type = type; | 871 | ace->type = type; |
872 | ace->flag = flag; | 872 | ace->flag = flag; |