aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-07-18 13:56:35 -0400
committerDavid Howells <dhowells@redhat.com>2014-07-22 16:46:30 -0400
commit7c3bec0a1f2cba8a01b505f032a75cfb8d5cd56d (patch)
treea1cbc1ecbf14ce9954c220c8fed1ab6130082093 /net/ceph
parentefa64c0978a1fb3de8bca6f931b9858c3e371f1f (diff)
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>
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/crypto.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c
index 2c8078d990ee..ffeba8f9dda9 100644
--- a/net/ceph/crypto.c
+++ b/net/ceph/crypto.c
@@ -8,6 +8,7 @@
8#include <linux/key-type.h> 8#include <linux/key-type.h>
9 9
10#include <keys/ceph-type.h> 10#include <keys/ceph-type.h>
11#include <keys/user-type.h>
11#include <linux/ceph/decode.h> 12#include <linux/ceph/decode.h>
12#include "crypto.h" 13#include "crypto.h"
13 14
@@ -462,11 +463,6 @@ static void ceph_key_free_preparse(struct key_preparsed_payload *prep)
462 kfree(ckey); 463 kfree(ckey);
463} 464}
464 465
465static int ceph_key_match(const struct key *key, const void *description)
466{
467 return strcmp(key->description, description) == 0;
468}
469
470static void ceph_key_destroy(struct key *key) 466static void ceph_key_destroy(struct key *key)
471{ 467{
472 struct ceph_crypto_key *ckey = key->payload.data; 468 struct ceph_crypto_key *ckey = key->payload.data;
@@ -480,7 +476,7 @@ struct key_type key_type_ceph = {
480 .preparse = ceph_key_preparse, 476 .preparse = ceph_key_preparse,
481 .free_preparse = ceph_key_free_preparse, 477 .free_preparse = ceph_key_free_preparse,
482 .instantiate = generic_key_instantiate, 478 .instantiate = generic_key_instantiate,
483 .match = ceph_key_match, 479 .match = user_match,
484 .destroy = ceph_key_destroy, 480 .destroy = ceph_key_destroy,
485}; 481};
486 482