NFS: move credential expiry tracking out of SUNRPC into NFS.
NFS needs to know when a credential is about to expire so that it can modify write-back behaviour to finish the write inside the expiry time. It currently uses functions in SUNRPC code which make use of a fairly complex callback scheme and flags in the generic credientials. As I am working to discard the generic credentials, this has to change. This patch moves the logic into NFS, in part by finding and caching the low-level credential in the open_context. We then make direct cred-api calls on that. This makes the code much simpler and removes a dependency on generic rpc credentials. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
committed by
Anna Schumaker
parent
1de7eea929
commit
ddf529eeed
@@ -360,29 +360,6 @@ out_nocache:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpcauth_init_credcache);
|
||||
|
||||
/*
|
||||
* Setup a credential key lifetime timeout notification
|
||||
*/
|
||||
int
|
||||
rpcauth_key_timeout_notify(struct rpc_auth *auth, struct rpc_cred *cred)
|
||||
{
|
||||
if (!cred->cr_auth->au_ops->key_timeout)
|
||||
return 0;
|
||||
return cred->cr_auth->au_ops->key_timeout(auth, cred);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpcauth_key_timeout_notify);
|
||||
|
||||
bool
|
||||
rpcauth_cred_key_to_expire(struct rpc_auth *auth, struct rpc_cred *cred)
|
||||
{
|
||||
if (auth->au_flags & RPCAUTH_AUTH_NO_CRKEY_TIMEOUT)
|
||||
return false;
|
||||
if (!cred->cr_ops->crkey_to_expire)
|
||||
return false;
|
||||
return cred->cr_ops->crkey_to_expire(cred);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpcauth_cred_key_to_expire);
|
||||
|
||||
char *
|
||||
rpcauth_stringify_acceptor(struct rpc_cred *cred)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user