aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-01 09:22:46 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 15:25:11 -0400
commita7b721037f898b29a8083da59b1dccd3da385b07 (patch)
tree57d0fba7528118a9d4dcd8395adbdb91956fcb17 /fs/nfs/nfs4proc.c
parent8e69514f2981d85108c2bd220ff8e188c0c27cdb (diff)
nfs41: introduce get_state_renewal_cred
Use the machine cred for sending SEQUENCE to renew the client's lease. [revamp patch for new state management design starting 2.6.29] [nfs41: support minorversion 1 for nfs4_check_lease] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: get cred in exchange_id when cred arg is NULL] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: use cl_machined_cred instead of cl_ex_cred] Since EXCHANGE_ID insists on using the machine credential, cl_ex_cred is not needed. nfs4_proc_exchange_id() is only called if the machine credential is available. Remove the credential logic from nfs4_proc_exchange_id. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index da481bda44f7..f862a66e5fb9 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4236,6 +4236,7 @@ static int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
4236 4236
4237 dprintk("--> %s\n", __func__); 4237 dprintk("--> %s\n", __func__);
4238 BUG_ON(clp == NULL); 4238 BUG_ON(clp == NULL);
4239
4239 p = (u32 *)verifier.data; 4240 p = (u32 *)verifier.data;
4240 *p++ = htonl((u32)clp->cl_boot_time.tv_sec); 4241 *p++ = htonl((u32)clp->cl_boot_time.tv_sec);
4241 *p = htonl((u32)clp->cl_boot_time.tv_nsec); 4242 *p = htonl((u32)clp->cl_boot_time.tv_nsec);
@@ -4795,12 +4796,14 @@ struct nfs4_state_recovery_ops nfs4_nograce_recovery_ops = {
4795 4796
4796struct nfs4_state_maintenance_ops nfs40_state_renewal_ops = { 4797struct nfs4_state_maintenance_ops nfs40_state_renewal_ops = {
4797 .sched_state_renewal = nfs4_proc_async_renew, 4798 .sched_state_renewal = nfs4_proc_async_renew,
4799 .get_state_renewal_cred_locked = nfs4_get_renew_cred_locked,
4798 .renew_lease = nfs4_proc_renew, 4800 .renew_lease = nfs4_proc_renew,
4799}; 4801};
4800 4802
4801#if defined(CONFIG_NFS_V4_1) 4803#if defined(CONFIG_NFS_V4_1)
4802struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = { 4804struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = {
4803 .sched_state_renewal = nfs41_proc_async_sequence, 4805 .sched_state_renewal = nfs41_proc_async_sequence,
4806 .get_state_renewal_cred_locked = nfs4_get_machine_cred_locked,
4804 .renew_lease = nfs4_proc_sequence, 4807 .renew_lease = nfs4_proc_sequence,
4805}; 4808};
4806#endif 4809#endif