[ 051/167] nfsd: fix endianness breakage in TEST_STATEID handling

From: Ben Hutchings
Date: Wed May 09 2012 - 02:01:43 EST

3.2-stable review patch. If anyone has any objections, please let me know.


From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxx>
Cc: "J. Bruce Fields" <bfields@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
fs/nfsd/nfs4xdr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3410,7 +3410,7 @@ nfsd4_encode_test_stateid(struct nfsd4_c
nfsd4_decode_stateid(argp, &si);
valid = nfs4_validate_stateid(cl, &si);
- *p++ = htonl(valid);
+ *p++ = valid;
resp->p = p;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/