diff options
-rw-r--r-- | fs/nfsd/nfs4acl.c | 3 | ||||
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 5 | ||||
-rw-r--r-- | fs/nfsd/vfs.c | 7 |
3 files changed, 12 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 9f17b64779f69..11ebf6c4aa54c 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c @@ -93,6 +93,9 @@ deny_mask(u32 allow_mask, unsigned int flags) return ret; } +/* XXX: modify functions to return NFS errors; they're only ever + * used by nfs code, after all.... */ + static int mode_from_nfs4(u32 perm, unsigned short *mode, unsigned int flags) { diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index f5e1833094dbc..36a058a112d57 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1331,7 +1331,10 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, if (bmval0 & FATTR4_WORD0_ACL) { if (status == -EOPNOTSUPP) bmval0 &= ~FATTR4_WORD0_ACL; - else if (status != 0) + else if (status == -EINVAL) { + status = nfserr_attrnotsupp; + goto out; + } else if (status != 0) goto out_nfserr; } } diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 0fc725c3bd45c..e3e9d217236e4 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -393,7 +393,7 @@ set_nfsv4_acl_one(struct dentry *dentry, struct posix_acl *pacl, char *key) } out: kfree(buf); - return (error); + return error; } int @@ -417,7 +417,10 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqstp, struct svc_fh *fhp, flags = NFS4_ACL_DIR; error = nfs4_acl_nfsv4_to_posix(acl, &pacl, &dpacl, flags); - if (error < 0) + if (error == -EINVAL) { + error = nfserr_attrnotsupp; + goto out; + } else if (error < 0) goto out_nfserr; if (pacl) { |