Skip to content

Commit

Permalink
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Trond Myklebust committed Nov 12, 2018
1 parent a652a4b commit e3d5e57
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions net/sunrpc/auth_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,7 @@ static bool generic_key_to_expire(struct rpc_cred *cred)
{
struct auth_cred *acred = &container_of(cred, struct generic_cred,
gc_base)->acred;
bool ret;

get_rpccred(cred);
ret = test_bit(RPC_CRED_KEY_EXPIRE_SOON, &acred->ac_flags);
put_rpccred(cred);

return ret;
return test_bit(RPC_CRED_KEY_EXPIRE_SOON, &acred->ac_flags);
}

static const struct rpc_credops generic_credops = {
Expand Down

0 comments on commit e3d5e57

Please sign in to comment.