]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfsd: fix endianness breakage in TEST_STATEID handling
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 13 Apr 2012 04:10:34 +0000 (00:10 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:12 +0000 (13:14 +0100)
commit 02f5fde5df0ea930e70f93763dd48beff182b208 upstream.

->ts_id_status gets nfs errno, i.e. it's already big-endian; no need
to apply htonl() to it.  Broken by commit 174568 (NFSD: Added TEST_STATEID
operation) last year...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/nfsd/nfs4xdr.c

index b6fa792d6b858b5950c483092e7c05ca8c583446..9cfa60ae4bc307a6559ea2f2d9a5615e59e02e07 100644 (file)
@@ -3411,7 +3411,7 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, int nfserr,
                nfsd4_decode_stateid(argp, &si);
                valid = nfs4_validate_stateid(cl, &si);
                RESERVE_SPACE(4);
-               *p++ = htonl(valid);
+               *p++ = valid;
                resp->p = p;
        }
        nfs4_unlock_state();