Skip to content

Commit 7c3bec0

Browse files
committed
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>
1 parent efa64c0 commit 7c3bec0

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎net/ceph/crypto.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/key-type.h>
99

1010
#include <keys/ceph-type.h>
11+
#include <keys/user-type.h>
1112
#include <linux/ceph/decode.h>
1213
#include "crypto.h"
1314

@@ -462,11 +463,6 @@ static void ceph_key_free_preparse(struct key_preparsed_payload *prep)
462463
kfree(ckey);
463464
}
464465

465-
static int ceph_key_match(const struct key *key, const void *description)
466-
{
467-
return strcmp(key->description, description) == 0;
468-
}
469-
470466
static void ceph_key_destroy(struct key *key)
471467
{
472468
struct ceph_crypto_key *ckey = key->payload.data;
@@ -480,7 +476,7 @@ struct key_type key_type_ceph = {
480476
.preparse = ceph_key_preparse,
481477
.free_preparse = ceph_key_free_preparse,
482478
.instantiate = generic_key_instantiate,
483-
.match = ceph_key_match,
479+
.match = user_match,
484480
.destroy = ceph_key_destroy,
485481
};
486482

0 commit comments

Comments
 (0)