mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-21 06:24:12 +00:00
KEYS: Ceph: Use user_match()
Ceph can use user_match() instead of defining its own identical function. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com> cc: Tommi Virtanen <tommi.virtanen@dreamhost.com>
This commit is contained in:
parent
efa64c0978
commit
7c3bec0a1f
1 changed files with 2 additions and 6 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include <linux/key-type.h>
|
#include <linux/key-type.h>
|
||||||
|
|
||||||
#include <keys/ceph-type.h>
|
#include <keys/ceph-type.h>
|
||||||
|
#include <keys/user-type.h>
|
||||||
#include <linux/ceph/decode.h>
|
#include <linux/ceph/decode.h>
|
||||||
#include "crypto.h"
|
#include "crypto.h"
|
||||||
|
|
||||||
|
@ -462,11 +463,6 @@ static void ceph_key_free_preparse(struct key_preparsed_payload *prep)
|
||||||
kfree(ckey);
|
kfree(ckey);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ceph_key_match(const struct key *key, const void *description)
|
|
||||||
{
|
|
||||||
return strcmp(key->description, description) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ceph_key_destroy(struct key *key)
|
static void ceph_key_destroy(struct key *key)
|
||||||
{
|
{
|
||||||
struct ceph_crypto_key *ckey = key->payload.data;
|
struct ceph_crypto_key *ckey = key->payload.data;
|
||||||
|
@ -480,7 +476,7 @@ struct key_type key_type_ceph = {
|
||||||
.preparse = ceph_key_preparse,
|
.preparse = ceph_key_preparse,
|
||||||
.free_preparse = ceph_key_free_preparse,
|
.free_preparse = ceph_key_free_preparse,
|
||||||
.instantiate = generic_key_instantiate,
|
.instantiate = generic_key_instantiate,
|
||||||
.match = ceph_key_match,
|
.match = user_match,
|
||||||
.destroy = ceph_key_destroy,
|
.destroy = ceph_key_destroy,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue