Commit cb34f0da authored by Trond Myklebust's avatar Trond Myklebust Committed by Kleber Sacilotto de Souza

SUNRPC: Fix a bogus get/put in generic_key_to_expire()

BugLink: https://bugs.launchpad.net/bugs/1810967

[ Upstream commit e3d5e573 ]
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 3b3b548c
...@@ -272,13 +272,7 @@ static bool generic_key_to_expire(struct rpc_cred *cred) ...@@ -272,13 +272,7 @@ static bool generic_key_to_expire(struct rpc_cred *cred)
{ {
struct auth_cred *acred = &container_of(cred, struct generic_cred, struct auth_cred *acred = &container_of(cred, struct generic_cred,
gc_base)->acred; gc_base)->acred;
bool ret; return test_bit(RPC_CRED_KEY_EXPIRE_SOON, &acred->ac_flags);
get_rpccred(cred);
ret = test_bit(RPC_CRED_KEY_EXPIRE_SOON, &acred->ac_flags);
put_rpccred(cred);
return ret;
} }
static const struct rpc_credops generic_credops = { static const struct rpc_credops generic_credops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment