Commit c2189c7f authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Greg Kroah-Hartman

nfsd4: fix test_stateid error reply encoding

commit a11fcce1 upstream.

If the entire operation fails then there's nothing to encode.
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9acc531f
...@@ -3408,6 +3408,9 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, int nfserr, ...@@ -3408,6 +3408,9 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, int nfserr,
struct nfsd4_test_stateid_id *stateid, *next; struct nfsd4_test_stateid_id *stateid, *next;
__be32 *p; __be32 *p;
if (nfserr)
return nfserr;
RESERVE_SPACE(4 + (4 * test_stateid->ts_num_ids)); RESERVE_SPACE(4 + (4 * test_stateid->ts_num_ids));
*p++ = htonl(test_stateid->ts_num_ids); *p++ = htonl(test_stateid->ts_num_ids);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment