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>
This commit is contained in:
parent
933602e368
commit
e3725ec015
6 changed files with 33 additions and 16 deletions
|
@ -5507,12 +5507,13 @@ static int decode_sequence(struct xdr_stream *xdr,
|
|||
struct rpc_rqst *rqstp)
|
||||
{
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
struct nfs4_session *session;
|
||||
struct nfs4_sessionid id;
|
||||
u32 dummy;
|
||||
int status;
|
||||
__be32 *p;
|
||||
|
||||
if (!res->sr_session)
|
||||
if (res->sr_slot == NULL)
|
||||
return 0;
|
||||
|
||||
status = decode_op_hdr(xdr, OP_SEQUENCE);
|
||||
|
@ -5526,8 +5527,9 @@ static int decode_sequence(struct xdr_stream *xdr,
|
|||
* sequence number, the server is looney tunes.
|
||||
*/
|
||||
status = -EREMOTEIO;
|
||||
session = res->sr_slot->table->session;
|
||||
|
||||
if (memcmp(id.data, res->sr_session->sess_id.data,
|
||||
if (memcmp(id.data, session->sess_id.data,
|
||||
NFS4_MAX_SESSIONID_LEN)) {
|
||||
dprintk("%s Invalid session id\n", __func__);
|
||||
goto out_err;
|
||||
|
@ -5545,7 +5547,7 @@ static int decode_sequence(struct xdr_stream *xdr,
|
|||
}
|
||||
/* slot id */
|
||||
dummy = be32_to_cpup(p++);
|
||||
if (dummy != res->sr_slot - res->sr_session->fc_slot_table.slots) {
|
||||
if (dummy != res->sr_slot - session->fc_slot_table.slots) {
|
||||
dprintk("%s Invalid slot id\n", __func__);
|
||||
goto out_err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue