Skip to content

Commit 6db2304

Browse files
committed
libceph: uninline ceph_crypto_key_destroy()
Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com>
1 parent 2b1e1a7 commit 6db2304

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

net/ceph/crypto.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *inkey)
8080
return 0;
8181
}
8282

83+
void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
84+
{
85+
if (key) {
86+
kfree(key->key);
87+
key->key = NULL;
88+
}
89+
}
90+
8391
static struct crypto_skcipher *ceph_crypto_alloc_cipher(void)
8492
{
8593
return crypto_alloc_skcipher("cbc(aes)", 0, CRYPTO_ALG_ASYNC);

net/ceph/crypto.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,12 @@ struct ceph_crypto_key {
1414
void *key;
1515
};
1616

17-
static inline void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
18-
{
19-
if (key) {
20-
kfree(key->key);
21-
key->key = NULL;
22-
}
23-
}
24-
2517
int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
2618
const struct ceph_crypto_key *src);
2719
int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end);
2820
int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end);
2921
int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *in);
22+
void ceph_crypto_key_destroy(struct ceph_crypto_key *key);
3023

3124
/* crypto.c */
3225
int ceph_crypt(const struct ceph_crypto_key *key, bool encrypt,

0 commit comments

Comments
 (0)