]> git.karo-electronics.de Git - linux-beck.git/commitdiff
libceph: uninline ceph_crypto_key_destroy()
authorIlya Dryomov <idryomov@gmail.com>
Fri, 2 Dec 2016 15:35:08 +0000 (16:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jan 2017 07:24:46 +0000 (08:24 +0100)
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>
net/ceph/crypto.c
net/ceph/crypto.h

index c4851038590002997e9c1c5d44d3c6ae30bcbecc..f19f31eeeef9e92f1fd5250c0d1f38529425fe97 100644 (file)
@@ -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);
index c33bcafd3829e69b2c7b539db31fb24d3e93773f..c4211590b721988b983bf1095923a6d39c6aabc3 100644 (file)
@@ -14,19 +14,12 @@ struct ceph_crypto_key {
        void *key;
 };
 
-static inline void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
-{
-       if (key) {
-               kfree(key->key);
-               key->key = NULL;
-       }
-}
-
 int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
                          const struct ceph_crypto_key *src);
 int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end);
 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end);
 int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *in);
+void ceph_crypto_key_destroy(struct ceph_crypto_key *key);
 
 /* crypto.c */
 int ceph_crypt(const struct ceph_crypto_key *key, bool encrypt,