]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
libceph: uninline ceph_crypto_key_destroy()
authorIlya Dryomov <idryomov@gmail.com>
Fri, 2 Dec 2016 15:35:08 +0000 (16:35 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 12 Dec 2016 22:09:20 +0000 (23:09 +0100)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
net/ceph/crypto.c
net/ceph/crypto.h

index 38936e1fd644cdd089b36370eea30c2223538f51..c4d8f68e0b18ce3bbdf659deeca33144f2544faa 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,