summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-02-03 16:31:42 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-06 07:51:42 -0700
commitc2189c7fedb781f3dd14b4df162661e36a85cc02 (patch)
treef913a63c0c1d04c74cd8af30ff5c4b72439768fa /fs
parent9acc531f6038cccb95a7bf4d26469196764e6d53 (diff)
nfsd4: fix test_stateid error reply encoding
commit a11fcce1544df08c723d950ff0edef3adac40405 upstream. If the entire operation fails then there's nothing to encode. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4xdr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index c99c94ea658b..a0f92ec4b38e 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3408,6 +3408,9 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, int nfserr,
struct nfsd4_test_stateid_id *stateid, *next;
__be32 *p;
+ if (nfserr)
+ return nfserr;
+
RESERVE_SPACE(4 + (4 * test_stateid->ts_num_ids));
*p++ = htonl(test_stateid->ts_num_ids);