NFS: Return directly if encode_sessionid fail
authorKinglong Mee <kinglongmee@gmail.com>
Thu, 24 Sep 2015 12:58:38 +0000 (20:58 +0800)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 21 Oct 2015 20:49:23 +0000 (15:49 -0500)
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>
fs/nfs/callback_xdr.c

index 4ad39fe203f7c957fa6df73ce8268b0d683e0127..646cdac73488e96041f2bcad33b4220b096da684 100644 (file)
@@ -699,7 +699,9 @@ static __be32 encode_cb_sequence_res(struct svc_rqst *rqstp,
        if (unlikely(status != 0))
                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));
        if (unlikely(p == NULL))