summaryrefslogtreecommitdiff
path: root/fs/nfs/callback_xdr.c
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2015-09-24 20:58:38 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-10-21 15:49:23 -0500
commite0a63c0bfcc6f8283377258b5d892f88abd913c1 (patch)
tree66f8b9b6518a80366e9f23556b3af7008411e1d8 /fs/nfs/callback_xdr.c
parent403889c0399c01a12877e3736ae1e96c9ded27be (diff)
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>
Diffstat (limited to 'fs/nfs/callback_xdr.c')
-rw-r--r--fs/nfs/callback_xdr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 4ad39fe203f7..646cdac73488 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -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))