diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2015-09-24 20:58:38 +0800 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-10-21 15:49:23 -0500 |
commit | e0a63c0bfcc6f8283377258b5d892f88abd913c1 (patch) | |
tree | 66f8b9b6518a80366e9f23556b3af7008411e1d8 /fs | |
parent | 403889c0399c01a12877e3736ae1e96c9ded27be (diff) | |
download | linux-e0a63c0bfcc6f8283377258b5d892f88abd913c1.tar.bz2 |
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')
-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 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)) |