Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217286
b: refs/heads/master
c: 90c8145
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields authored and J. Bruce Fields committed Oct 21, 2010
1 parent 5b61079 commit 12c6a5f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: edd76786633a3145661c7a90c9baccae8e3c9e84
refs/heads/master: 90c8145bb6fe1d9e0a808de6a701748967588bbd
9 changes: 5 additions & 4 deletions trunk/fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,15 @@ encode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_callback *cb,
struct nfs4_cb_compound_hdr *hdr)
{
__be32 *p;
struct nfsd4_session *ses = cb->cb_clp->cl_cb_session;

if (hdr->minorversion == 0)
return;

RESERVE_SPACE(1 + NFS4_MAX_SESSIONID_LEN + 20);

WRITE32(OP_CB_SEQUENCE);
WRITEMEM(cb->cb_clp->cl_sessionid.data, NFS4_MAX_SESSIONID_LEN);
WRITEMEM(ses->se_sessionid.data, NFS4_MAX_SESSIONID_LEN);
WRITE32(cb->cb_clp->cl_cb_seq_nr);
WRITE32(0); /* slotid, always 0 */
WRITE32(0); /* highest slotid always 0 */
Expand Down Expand Up @@ -341,6 +342,7 @@ static int
decode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_callback *cb,
struct rpc_rqst *rqstp)
{
struct nfsd4_session *ses = cb->cb_clp->cl_cb_session;
struct nfs4_sessionid id;
int status;
u32 dummy;
Expand All @@ -362,8 +364,7 @@ decode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_callback *cb,
READ_BUF(NFS4_MAX_SESSIONID_LEN + 16);
memcpy(id.data, p, NFS4_MAX_SESSIONID_LEN);
p += XDR_QUADLEN(NFS4_MAX_SESSIONID_LEN);
if (memcmp(id.data, cb->cb_clp->cl_sessionid.data,
NFS4_MAX_SESSIONID_LEN)) {
if (memcmp(id.data, ses->se_sessionid.data, NFS4_MAX_SESSIONID_LEN)) {
dprintk("%s Invalid session id\n", __func__);
goto out;
}
Expand Down Expand Up @@ -587,7 +588,7 @@ void nfsd4_probe_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn)
static int nfsd41_cb_setup_sequence(struct nfs4_client *clp,
struct rpc_task *task)
{
u32 *ptr = (u32 *)clp->cl_sessionid.data;
u32 *ptr = (u32 *)clp->cl_cb_session->se_sessionid.data;
int status = 0;

dprintk("%s: %u:%u:%u:%u\n", __func__,
Expand Down
4 changes: 1 addition & 3 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,6 @@ static __be32 alloc_init_session(struct svc_rqst *rqstp, struct nfs4_client *clp

new->se_client = clp;
gen_sessionid(new);
memcpy(clp->cl_sessionid.data, new->se_sessionid.data,
NFS4_MAX_SESSIONID_LEN);

INIT_LIST_HEAD(&new->se_conns);

Expand Down Expand Up @@ -1544,7 +1542,7 @@ nfsd4_create_session(struct svc_rqst *rqstp,
if (status)
goto out;

memcpy(cr_ses->sessionid.data, conf->cl_sessionid.data,
memcpy(cr_ses->sessionid.data, conf->cl_cb_session->se_sessionid.data,
NFS4_MAX_SESSIONID_LEN);
cr_ses->seqid = cs_slot->sl_seqid;

Expand Down
1 change: 0 additions & 1 deletion trunk/fs/nfsd/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ struct nfs4_client {
struct list_head cl_sessions;
struct nfsd4_clid_slot cl_cs_slot; /* create_session slot */
u32 cl_exchange_flags;
struct nfs4_sessionid cl_sessionid;
/* number of rpc's in progress over an associated session: */
atomic_t cl_refcount;

Expand Down

0 comments on commit 12c6a5f

Please sign in to comment.