提交 6fdf339b 编写于 作者: T Trond Myklebust

NFSv4.2: Fix warning "variable ‘stateids’ set but not used"

Replace it with a test for whether or not the sent a stateid in violation
of what we asked for.
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 13997823
...@@ -330,13 +330,21 @@ static int decode_write_response(struct xdr_stream *xdr, ...@@ -330,13 +330,21 @@ static int decode_write_response(struct xdr_stream *xdr,
struct nfs42_write_res *res) struct nfs42_write_res *res)
{ {
__be32 *p; __be32 *p;
int stateids;
p = xdr_inline_decode(xdr, 4 + 8 + 4); p = xdr_inline_decode(xdr, 4 + 8 + 4);
if (unlikely(!p)) if (unlikely(!p))
goto out_overflow; goto out_overflow;
stateids = be32_to_cpup(p++); /*
* We never use asynchronous mode, so warn if a server returns
* a stateid.
*/
if (unlikely(*p != 0)) {
pr_err_once("%s: server has set unrequested "
"asynchronous mode\n", __func__);
return -EREMOTEIO;
}
p++;
p = xdr_decode_hyper(p, &res->count); p = xdr_decode_hyper(p, &res->count);
res->verifier.committed = be32_to_cpup(p); res->verifier.committed = be32_to_cpup(p);
return decode_verifier(xdr, &res->verifier.verifier); return decode_verifier(xdr, &res->verifier.verifier);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册