diff options
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index a269dbeff150..78ac779c09ff 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -251,6 +251,7 @@ encode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_callback *cb, | |||
251 | struct nfs4_cb_compound_hdr *hdr) | 251 | struct nfs4_cb_compound_hdr *hdr) |
252 | { | 252 | { |
253 | __be32 *p; | 253 | __be32 *p; |
254 | struct nfsd4_session *ses = cb->cb_clp->cl_cb_session; | ||
254 | 255 | ||
255 | if (hdr->minorversion == 0) | 256 | if (hdr->minorversion == 0) |
256 | return; | 257 | return; |
@@ -258,7 +259,7 @@ encode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_callback *cb, | |||
258 | RESERVE_SPACE(1 + NFS4_MAX_SESSIONID_LEN + 20); | 259 | RESERVE_SPACE(1 + NFS4_MAX_SESSIONID_LEN + 20); |
259 | 260 | ||
260 | WRITE32(OP_CB_SEQUENCE); | 261 | WRITE32(OP_CB_SEQUENCE); |
261 | WRITEMEM(cb->cb_clp->cl_sessionid.data, NFS4_MAX_SESSIONID_LEN); | 262 | WRITEMEM(ses->se_sessionid.data, NFS4_MAX_SESSIONID_LEN); |
262 | WRITE32(cb->cb_clp->cl_cb_seq_nr); | 263 | WRITE32(cb->cb_clp->cl_cb_seq_nr); |
263 | WRITE32(0); /* slotid, always 0 */ | 264 | WRITE32(0); /* slotid, always 0 */ |
264 | WRITE32(0); /* highest slotid always 0 */ | 265 | WRITE32(0); /* highest slotid always 0 */ |
@@ -341,6 +342,7 @@ static int | |||
341 | decode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_callback *cb, | 342 | decode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_callback *cb, |
342 | struct rpc_rqst *rqstp) | 343 | struct rpc_rqst *rqstp) |
343 | { | 344 | { |
345 | struct nfsd4_session *ses = cb->cb_clp->cl_cb_session; | ||
344 | struct nfs4_sessionid id; | 346 | struct nfs4_sessionid id; |
345 | int status; | 347 | int status; |
346 | u32 dummy; | 348 | u32 dummy; |
@@ -362,8 +364,7 @@ decode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_callback *cb, | |||
362 | READ_BUF(NFS4_MAX_SESSIONID_LEN + 16); | 364 | READ_BUF(NFS4_MAX_SESSIONID_LEN + 16); |
363 | memcpy(id.data, p, NFS4_MAX_SESSIONID_LEN); | 365 | memcpy(id.data, p, NFS4_MAX_SESSIONID_LEN); |
364 | p += XDR_QUADLEN(NFS4_MAX_SESSIONID_LEN); | 366 | p += XDR_QUADLEN(NFS4_MAX_SESSIONID_LEN); |
365 | if (memcmp(id.data, cb->cb_clp->cl_sessionid.data, | 367 | if (memcmp(id.data, ses->se_sessionid.data, NFS4_MAX_SESSIONID_LEN)) { |
366 | NFS4_MAX_SESSIONID_LEN)) { | ||
367 | dprintk("%s Invalid session id\n", __func__); | 368 | dprintk("%s Invalid session id\n", __func__); |
368 | goto out; | 369 | goto out; |
369 | } | 370 | } |
@@ -587,7 +588,7 @@ void nfsd4_probe_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn) | |||
587 | static int nfsd41_cb_setup_sequence(struct nfs4_client *clp, | 588 | static int nfsd41_cb_setup_sequence(struct nfs4_client *clp, |
588 | struct rpc_task *task) | 589 | struct rpc_task *task) |
589 | { | 590 | { |
590 | u32 *ptr = (u32 *)clp->cl_sessionid.data; | 591 | u32 *ptr = (u32 *)clp->cl_cb_session->se_sessionid.data; |
591 | int status = 0; | 592 | int status = 0; |
592 | 593 | ||
593 | dprintk("%s: %u:%u:%u:%u\n", __func__, | 594 | dprintk("%s: %u:%u:%u:%u\n", __func__, |