summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_generic.c
diff options
context:
space:
mode:
authorTrond Myklebust2018-11-12 22:06:51 +0100
committerGreg Kroah-Hartman2018-12-01 09:37:33 +0100
commitab1a520669381c68b542f5c110a01a514ac28950 (patch)
treeb44b1ec2a5396430888b893caa07ab3992125393 /net/sunrpc/auth_generic.c
parentblock: copy ioprio in __bio_clone_fast() and bounce (diff)
downloadkernel-qcow2-linux-ab1a520669381c68b542f5c110a01a514ac28950.tar.gz
kernel-qcow2-linux-ab1a520669381c68b542f5c110a01a514ac28950.tar.xz
kernel-qcow2-linux-ab1a520669381c68b542f5c110a01a514ac28950.zip
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
[ Upstream commit e3d5e573a54dabdc0f9f3cb039d799323372b251 ] Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/sunrpc/auth_generic.c')
-rw-r--r--net/sunrpc/auth_generic.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/sunrpc/auth_generic.c b/net/sunrpc/auth_generic.c
index f1df9837f1ac..1ac08dcbf85d 100644
--- a/net/sunrpc/auth_generic.c
+++ b/net/sunrpc/auth_generic.c
@@ -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 = {