mirror of https://gitee.com/openkylin/linux.git
SUNRPC: Remove redundant check for the reply length in call_decode()
Now that we're using the xdr_stream functions to decode the header, the test for the minimum reply length is redundant. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
928d42f7d8
commit
5e3863fd59
|
@ -2392,9 +2392,6 @@ call_decode(struct rpc_task *task)
|
||||||
WARN_ON(memcmp(&req->rq_rcv_buf, &req->rq_private_buf,
|
WARN_ON(memcmp(&req->rq_rcv_buf, &req->rq_private_buf,
|
||||||
sizeof(req->rq_rcv_buf)) != 0);
|
sizeof(req->rq_rcv_buf)) != 0);
|
||||||
|
|
||||||
if (req->rq_rcv_buf.len < 12)
|
|
||||||
goto out_retry;
|
|
||||||
|
|
||||||
xdr_init_decode(&xdr, &req->rq_rcv_buf,
|
xdr_init_decode(&xdr, &req->rq_rcv_buf,
|
||||||
req->rq_rcv_buf.head[0].iov_base, req);
|
req->rq_rcv_buf.head[0].iov_base, req);
|
||||||
switch (rpc_decode_header(task, &xdr)) {
|
switch (rpc_decode_header(task, &xdr)) {
|
||||||
|
@ -2405,7 +2402,6 @@ call_decode(struct rpc_task *task)
|
||||||
task->tk_pid, __func__, task->tk_status);
|
task->tk_pid, __func__, task->tk_status);
|
||||||
return;
|
return;
|
||||||
case -EAGAIN:
|
case -EAGAIN:
|
||||||
out_retry:
|
|
||||||
task->tk_status = 0;
|
task->tk_status = 0;
|
||||||
/* Note: rpc_decode_header() may have freed the RPC slot */
|
/* Note: rpc_decode_header() may have freed the RPC slot */
|
||||||
if (task->tk_rqstp == req) {
|
if (task->tk_rqstp == req) {
|
||||||
|
|
Loading…
Reference in New Issue