diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2015-09-24 12:58:38 (GMT) |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-10-21 20:49:23 (GMT) |
commit | e0a63c0bfcc6f8283377258b5d892f88abd913c1 (patch) | |
tree | 66f8b9b6518a80366e9f23556b3af7008411e1d8 | |
parent | 403889c0399c01a12877e3736ae1e96c9ded27be (diff) | |
download | linux-e0a63c0bfcc6f8283377258b5d892f88abd913c1.tar.xz |
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>
-rw-r--r-- | fs/nfs/callback_xdr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 4ad39fe..646cdac 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)) |