summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-16 12:25:01 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-26 17:49:04 -0500
commite3725ec015dfbbeb896295cf2b3a995f28b0630e (patch)
tree1ec889fb5b29d2fa2da4912107d5c3dd41baba7f /fs/nfs/nfs4xdr.c
parent933602e368c4452260c9bff4fbb3baba35cf987a (diff)
NFSv4.1: Shrink struct nfs4_sequence_res by moving the session pointer
Move the session pointer into the slot table, then have struct nfs4_slot point to that slot table. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 672d9b0ef2c5..4126f054610a 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -5507,12 +5507,13 @@ static int decode_sequence(struct xdr_stream *xdr,
5507 struct rpc_rqst *rqstp) 5507 struct rpc_rqst *rqstp)
5508{ 5508{
5509#if defined(CONFIG_NFS_V4_1) 5509#if defined(CONFIG_NFS_V4_1)
5510 struct nfs4_session *session;
5510 struct nfs4_sessionid id; 5511 struct nfs4_sessionid id;
5511 u32 dummy; 5512 u32 dummy;
5512 int status; 5513 int status;
5513 __be32 *p; 5514 __be32 *p;
5514 5515
5515 if (!res->sr_session) 5516 if (res->sr_slot == NULL)
5516 return 0; 5517 return 0;
5517 5518
5518 status = decode_op_hdr(xdr, OP_SEQUENCE); 5519 status = decode_op_hdr(xdr, OP_SEQUENCE);
@@ -5526,8 +5527,9 @@ static int decode_sequence(struct xdr_stream *xdr,
5526 * sequence number, the server is looney tunes. 5527 * sequence number, the server is looney tunes.
5527 */ 5528 */
5528 status = -EREMOTEIO; 5529 status = -EREMOTEIO;
5530 session = res->sr_slot->table->session;
5529 5531
5530 if (memcmp(id.data, res->sr_session->sess_id.data, 5532 if (memcmp(id.data, session->sess_id.data,
5531 NFS4_MAX_SESSIONID_LEN)) { 5533 NFS4_MAX_SESSIONID_LEN)) {
5532 dprintk("%s Invalid session id\n", __func__); 5534 dprintk("%s Invalid session id\n", __func__);
5533 goto out_err; 5535 goto out_err;
@@ -5545,7 +5547,7 @@ static int decode_sequence(struct xdr_stream *xdr,
5545 } 5547 }
5546 /* slot id */ 5548 /* slot id */
5547 dummy = be32_to_cpup(p++); 5549 dummy = be32_to_cpup(p++);
5548 if (dummy != res->sr_slot - res->sr_session->fc_slot_table.slots) { 5550 if (dummy != res->sr_slot - session->fc_slot_table.slots) {
5549 dprintk("%s Invalid slot id\n", __func__); 5551 dprintk("%s Invalid slot id\n", __func__);
5550 goto out_err; 5552 goto out_err;
5551 } 5553 }