Commit 1796549a authored by Anna Schumaker's avatar Anna Schumaker Committed by Trond Myklebust

NFS: Clean up decode_cb_sequence_args()

Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent c79d56d2
...@@ -413,12 +413,11 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp, ...@@ -413,12 +413,11 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp,
status = decode_sessionid(xdr, &args->csa_sessionid); status = decode_sessionid(xdr, &args->csa_sessionid);
if (status) if (status)
goto out; return status;
status = htonl(NFS4ERR_RESOURCE);
p = read_buf(xdr, 5 * sizeof(uint32_t)); p = read_buf(xdr, 5 * sizeof(uint32_t));
if (unlikely(p == NULL)) if (unlikely(p == NULL))
goto out; return htonl(NFS4ERR_RESOURCE);
args->csa_addr = svc_addr(rqstp); args->csa_addr = svc_addr(rqstp);
args->csa_sequenceid = ntohl(*p++); args->csa_sequenceid = ntohl(*p++);
...@@ -432,7 +431,7 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp, ...@@ -432,7 +431,7 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp,
sizeof(*args->csa_rclists), sizeof(*args->csa_rclists),
GFP_KERNEL); GFP_KERNEL);
if (unlikely(args->csa_rclists == NULL)) if (unlikely(args->csa_rclists == NULL))
goto out; return htonl(NFS4ERR_RESOURCE);
for (i = 0; i < args->csa_nrclists; i++) { for (i = 0; i < args->csa_nrclists; i++) {
status = decode_rc_list(xdr, &args->csa_rclists[i]); status = decode_rc_list(xdr, &args->csa_rclists[i]);
...@@ -442,27 +441,13 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp, ...@@ -442,27 +441,13 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp,
} }
} }
} }
status = 0; return 0;
dprintk("%s: sessionid %x:%x:%x:%x sequenceid %u slotid %u "
"highestslotid %u cachethis %d nrclists %u\n",
__func__,
((u32 *)&args->csa_sessionid)[0],
((u32 *)&args->csa_sessionid)[1],
((u32 *)&args->csa_sessionid)[2],
((u32 *)&args->csa_sessionid)[3],
args->csa_sequenceid, args->csa_slotid,
args->csa_highestslotid, args->csa_cachethis,
args->csa_nrclists);
out:
dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
return status;
out_free: out_free:
for (i = 0; i < args->csa_nrclists; i++) for (i = 0; i < args->csa_nrclists; i++)
kfree(args->csa_rclists[i].rcl_refcalls); kfree(args->csa_rclists[i].rcl_refcalls);
kfree(args->csa_rclists); kfree(args->csa_rclists);
goto out; return status;
} }
static __be32 decode_recallany_args(struct svc_rqst *rqstp, static __be32 decode_recallany_args(struct svc_rqst *rqstp,
......
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