aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorRicardo Labiaga <Ricardo.Labiaga@netapp.com>2009-12-06 12:23:46 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-06 12:23:46 -0500
commit9430fb6b5315f7bc94b05be915c64ebfefc55bbc (patch)
treebdd930aef91eb7ef954a51919ee2fecae8044e01 /fs/nfs/nfs4proc.c
parentbcb56164ceb21317208eee89c829580d51b84a6d (diff)
nfs41: nfs41_setup_state_renewal
Move call to get the lease time and the setup of the state renewal out of nfs4_create_session so that it can be called after clearing the DRAINING flag. We use the getattr RPC to obtain the lease time, which requires a sequence slot. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b4ef570eb53c..4be036942569 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4745,7 +4745,6 @@ int nfs4_proc_create_session(struct nfs_client *clp)
4745{ 4745{
4746 int status; 4746 int status;
4747 unsigned *ptr; 4747 unsigned *ptr;
4748 struct nfs_fsinfo fsinfo;
4749 struct nfs4_session *session = clp->cl_session; 4748 struct nfs4_session *session = clp->cl_session;
4750 4749
4751 dprintk("--> %s clp=%p session=%p\n", __func__, clp, session); 4750 dprintk("--> %s clp=%p session=%p\n", __func__, clp, session);
@@ -4767,18 +4766,6 @@ int nfs4_proc_create_session(struct nfs_client *clp)
4767 ptr = (unsigned *)&session->sess_id.data[0]; 4766 ptr = (unsigned *)&session->sess_id.data[0];
4768 dprintk("%s client>seqid %d sessionid %u:%u:%u:%u\n", __func__, 4767 dprintk("%s client>seqid %d sessionid %u:%u:%u:%u\n", __func__,
4769 clp->cl_seqid, ptr[0], ptr[1], ptr[2], ptr[3]); 4768 clp->cl_seqid, ptr[0], ptr[1], ptr[2], ptr[3]);
4770
4771 /* Get the lease time */
4772 status = nfs4_proc_get_lease_time(clp, &fsinfo);
4773 if (status == 0) {
4774 /* Update lease time and schedule renewal */
4775 spin_lock(&clp->cl_lock);
4776 clp->cl_lease_time = fsinfo.lease_time * HZ;
4777 clp->cl_last_renewal = jiffies;
4778 spin_unlock(&clp->cl_lock);
4779
4780 nfs4_schedule_state_renewal(clp);
4781 }
4782out: 4769out:
4783 dprintk("<-- %s\n", __func__); 4770 dprintk("<-- %s\n", __func__);
4784 return status; 4771 return status;