diff options
| author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-03-15 13:11:36 -0400 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-03-15 13:11:36 -0400 |
| commit | 5e3863fd597eba8c6679de805681631b1aad9bdb (patch) | |
| tree | 86062f4751c1766e5d66a86c7bfcdbb22bff59ae | |
| parent | 928d42f7d8737e1d6327e09668525f59725dabf9 (diff) | |
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>
| -rw-r--r-- | net/sunrpc/clnt.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index cb73d6c25857..228970e6e52b 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
| @@ -2392,9 +2392,6 @@ call_decode(struct rpc_task *task) | |||
| 2392 | WARN_ON(memcmp(&req->rq_rcv_buf, &req->rq_private_buf, | 2392 | WARN_ON(memcmp(&req->rq_rcv_buf, &req->rq_private_buf, |
| 2393 | sizeof(req->rq_rcv_buf)) != 0); | 2393 | sizeof(req->rq_rcv_buf)) != 0); |
| 2394 | 2394 | ||
| 2395 | if (req->rq_rcv_buf.len < 12) | ||
| 2396 | goto out_retry; | ||
| 2397 | |||
| 2398 | xdr_init_decode(&xdr, &req->rq_rcv_buf, | 2395 | xdr_init_decode(&xdr, &req->rq_rcv_buf, |
| 2399 | req->rq_rcv_buf.head[0].iov_base, req); | 2396 | req->rq_rcv_buf.head[0].iov_base, req); |
| 2400 | switch (rpc_decode_header(task, &xdr)) { | 2397 | switch (rpc_decode_header(task, &xdr)) { |
| @@ -2405,7 +2402,6 @@ call_decode(struct rpc_task *task) | |||
| 2405 | task->tk_pid, __func__, task->tk_status); | 2402 | task->tk_pid, __func__, task->tk_status); |
| 2406 | return; | 2403 | return; |
| 2407 | case -EAGAIN: | 2404 | case -EAGAIN: |
| 2408 | out_retry: | ||
| 2409 | task->tk_status = 0; | 2405 | task->tk_status = 0; |
| 2410 | /* Note: rpc_decode_header() may have freed the RPC slot */ | 2406 | /* Note: rpc_decode_header() may have freed the RPC slot */ |
| 2411 | if (task->tk_rqstp == req) { | 2407 | if (task->tk_rqstp == req) { |
