summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-16 12:12:38 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-21 09:29:53 -0500
commit933602e368c4452260c9bff4fbb3baba35cf987a (patch)
tree44839731364e55c7d6b4c8ae6f4906386046c8c6 /fs/nfs/nfs4proc.c
parent9216106a847a53e6d0fe6d11dfd9175f2ca7fccf (diff)
downloadlinux-3.10-933602e368c4452260c9bff4fbb3baba35cf987a.tar.gz
linux-3.10-933602e368c4452260c9bff4fbb3baba35cf987a.tar.bz2
linux-3.10-933602e368c4452260c9bff4fbb3baba35cf987a.zip
NFSv4.1: Shrink struct nfs4_sequence_res by moving sr_renewal_time
Store the renewal time inside the session slot instead. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 5e5cc5a5065..14b39742b6e 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -486,6 +486,7 @@ static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res)
static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *res)
{
+ struct nfs4_slot *slot;
unsigned long timestamp;
struct nfs_client *clp;
@@ -502,12 +503,14 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
if (!RPC_WAS_SENT(task))
goto out;
+ slot = res->sr_slot;
+
/* Check the SEQUENCE operation status */
switch (res->sr_status) {
case 0:
/* Update the slot's sequence and clientid lease timer */
- ++res->sr_slot->seq_nr;
- timestamp = res->sr_renewal_time;
+ ++slot->seq_nr;
+ timestamp = slot->renewal_time;
clp = res->sr_session->clp;
do_renew_lease(clp, timestamp);
/* Check sequence flags */
@@ -521,12 +524,12 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
*/
dprintk("%s: slot=%td seq=%d: Operation in progress\n",
__func__,
- res->sr_slot - res->sr_session->fc_slot_table.slots,
- res->sr_slot->seq_nr);
+ slot - res->sr_session->fc_slot_table.slots,
+ slot->seq_nr);
goto out_retry;
default:
/* Just update the slot sequence no. */
- ++res->sr_slot->seq_nr;
+ ++slot->seq_nr;
}
out:
/* The session may be reset by one of the error handlers. */
@@ -637,6 +640,7 @@ int nfs41_setup_sequence(struct nfs4_session *session,
rpc_task_set_priority(task, RPC_PRIORITY_NORMAL);
slot = tbl->slots + slotid;
+ slot->renewal_time = jiffies;
args->sa_session = session;
args->sa_slotid = slotid;
@@ -644,7 +648,6 @@ int nfs41_setup_sequence(struct nfs4_session *session,
res->sr_session = session;
res->sr_slot = slot;
- res->sr_renewal_time = jiffies;
res->sr_status_flags = 0;
/*
* sr_status is only set in decode_sequence, and so will remain