NFS: Return directly if encode_sessionid fail

encode_sessionid() may return error, nfs needs process the return value.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
Kinglong Mee 2015-09-24 20:58:38 +08:00 committed by Trond Myklebust
parent 403889c039
commit e0a63c0bfc
1 changed files with 3 additions and 1 deletions

View File

@ -699,7 +699,9 @@ static __be32 encode_cb_sequence_res(struct svc_rqst *rqstp,
if (unlikely(status != 0)) if (unlikely(status != 0))
goto out; goto out;
encode_sessionid(xdr, &res->csr_sessionid); status = encode_sessionid(xdr, &res->csr_sessionid);
if (status)
goto out;
p = xdr_reserve_space(xdr, 4 * sizeof(uint32_t)); p = xdr_reserve_space(xdr, 4 * sizeof(uint32_t));
if (unlikely(p == NULL)) if (unlikely(p == NULL))