]> err.no Git - linux-2.6/commitdiff
[PATCH] knfsd: nfsd4: fix error return on unsupported acl
authorJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 16 Feb 2007 09:28:34 +0000 (01:28 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 16 Feb 2007 16:14:01 +0000 (08:14 -0800)
We should be returning ATTRNOTSUPP, not NOTSUPP, when acls are unsupported.

Also fix a comment.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfsd/nfs4xdr.c
fs/nfsd/vfs.c

index bb0f1860f582f6d0c8e258082614308319a4833b..5d090f11f2bee92c3e371fbd0ae982df7d6a758d 100644 (file)
@@ -253,7 +253,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, struct iattr *ia
                return status;
 
        /*
-        * According to spec, unsupported attributes return ERR_NOTSUPP;
+        * According to spec, unsupported attributes return ERR_ATTRNOTSUPP;
         * read-only attributes return ERR_INVAL.
         */
        if ((bmval[0] & ~NFSD_SUPPORTED_ATTRS_WORD0) || (bmval[1] & ~NFSD_SUPPORTED_ATTRS_WORD1))
index 8283236c6a0f1f8034f5006ed484cf4b2bb758eb..7e6aa245b5d5f30b270c5336267eb77760be41ac 100644 (file)
@@ -466,7 +466,10 @@ out:
        posix_acl_release(dpacl);
        return (error);
 out_nfserr:
-       error = nfserrno(host_error);
+       if (host_error == -EOPNOTSUPP)
+               error = nfserr_attrnotsupp;
+       else
+               error = nfserrno(host_error);
        goto out;
 }