summaryrefslogtreecommitdiff
path: root/net/ceph/crypto.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-12-02 15:35:08 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-26 07:24:46 (GMT)
commit5b482bf5886855be44e89653f88297aab423dee6 (patch)
tree93ae299da251d0842b529b4e75e5d9894a3a1583 /net/ceph/crypto.c
parent12274f2c17f2f7d5c0a0cfdc649410c9a37bb66c (diff)
downloadlinux-5b482bf5886855be44e89653f88297aab423dee6.tar.xz
libceph: uninline ceph_crypto_key_destroy()
commit 6db2304aabb070261ad34923bfd83c43dfb000e3 upstream. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ceph/crypto.c')
-rw-r--r--net/ceph/crypto.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c
index c485103..f19f31e 100644
--- a/net/ceph/crypto.c
+++ b/net/ceph/crypto.c
@@ -80,6 +80,14 @@ int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *inkey)
return 0;
}
+void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
+{
+ if (key) {
+ kfree(key->key);
+ key->key = NULL;
+ }
+}
+
static struct crypto_skcipher *ceph_crypto_alloc_cipher(void)
{
return crypto_alloc_skcipher("cbc(aes)", 0, CRYPTO_ALG_ASYNC);