diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-03 03:55:25 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-06 14:58:47 -0500 |
commit | b4454fe1a7cb76a248d0641c9d68a44a1b8d9a1f (patch) | |
tree | 50ddc265e9700b1924e45ffce0f4583ba1013177 /fs/nfs/nfs4renewd.c | |
parent | 58d9714a44a79bba9b414da3ffbf3c753dc5915f (diff) |
NFSv4: Remove requirement for machine creds for the "renew" operation
In RFC3530, the RENEW operation is allowed to use either
the same principal, RPC security flavour and (if RPCSEC_GSS), the same
mechanism and service that was used for SETCLIENTID_CONFIRM
OR
Any principal, RPC security flavour and service combination that
currently has an OPEN file on the server.
Choose the latter since that doesn't require us to keep credentials for
the same principal for the entire duration of the mount.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4renewd.c')
-rw-r--r-- | fs/nfs/nfs4renewd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c index f62c2f7a4ffb..5d764d8e6d8a 100644 --- a/fs/nfs/nfs4renewd.c +++ b/fs/nfs/nfs4renewd.c | |||
@@ -62,6 +62,7 @@ void | |||
62 | nfs4_renew_state(void *data) | 62 | nfs4_renew_state(void *data) |
63 | { | 63 | { |
64 | struct nfs4_client *clp = (struct nfs4_client *)data; | 64 | struct nfs4_client *clp = (struct nfs4_client *)data; |
65 | struct rpc_cred *cred; | ||
65 | long lease, timeout; | 66 | long lease, timeout; |
66 | unsigned long last, now; | 67 | unsigned long last, now; |
67 | 68 | ||
@@ -77,7 +78,8 @@ nfs4_renew_state(void *data) | |||
77 | timeout = (2 * lease) / 3 + (long)last - (long)now; | 78 | timeout = (2 * lease) / 3 + (long)last - (long)now; |
78 | /* Are we close to a lease timeout? */ | 79 | /* Are we close to a lease timeout? */ |
79 | if (time_after(now, last + lease/3)) { | 80 | if (time_after(now, last + lease/3)) { |
80 | if (list_empty(&clp->cl_state_owners)) { | 81 | cred = nfs4_get_renew_cred(clp); |
82 | if (cred == NULL) { | ||
81 | set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); | 83 | set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); |
82 | spin_unlock(&clp->cl_lock); | 84 | spin_unlock(&clp->cl_lock); |
83 | nfs_expire_all_delegations(clp); | 85 | nfs_expire_all_delegations(clp); |
@@ -85,7 +87,8 @@ nfs4_renew_state(void *data) | |||
85 | } | 87 | } |
86 | spin_unlock(&clp->cl_lock); | 88 | spin_unlock(&clp->cl_lock); |
87 | /* Queue an asynchronous RENEW. */ | 89 | /* Queue an asynchronous RENEW. */ |
88 | nfs4_proc_async_renew(clp); | 90 | nfs4_proc_async_renew(clp, cred); |
91 | put_rpccred(cred); | ||
89 | timeout = (2 * lease) / 3; | 92 | timeout = (2 * lease) / 3; |
90 | spin_lock(&clp->cl_lock); | 93 | spin_lock(&clp->cl_lock); |
91 | } else | 94 | } else |