diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2015-09-24 14:58:38 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-10-21 22:49:23 +0200 |
commit | e0a63c0bfcc6f8283377258b5d892f88abd913c1 (patch) | |
tree | 66f8b9b6518a80366e9f23556b3af7008411e1d8 /fs/nfs/callback_xdr.c | |
parent | NFS: Fix bad checking of max taglen in callback request (diff) | |
download | linux-e0a63c0bfcc6f8283377258b5d892f88abd913c1.tar.xz linux-e0a63c0bfcc6f8283377258b5d892f88abd913c1.zip |
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.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)) |