summaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-07-18 18:56:35 +0100
committerDavid Howells <dhowells@redhat.com>2014-07-22 21:46:30 +0100
commit7c3bec0a1f2cba8a01b505f032a75cfb8d5cd56d (patch)
treea1cbc1ecbf14ce9954c220c8fed1ab6130082093 /net/ceph
parentefa64c0978a1fb3de8bca6f931b9858c3e371f1f (diff)
downloadlinux-7c3bec0a1f2cba8a01b505f032a75cfb8d5cd56d.tar.gz
linux-7c3bec0a1f2cba8a01b505f032a75cfb8d5cd56d.tar.bz2
linux-7c3bec0a1f2cba8a01b505f032a75cfb8d5cd56d.zip
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 @@
#include <linux/key-type.h>
#include <keys/ceph-type.h>
+#include <keys/user-type.h>
#include <linux/ceph/decode.h>
#include "crypto.h"
@@ -462,11 +463,6 @@ static void ceph_key_free_preparse(struct key_preparsed_payload *prep)
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)
{
struct ceph_crypto_key *ckey = key->payload.data;
@@ -480,7 +476,7 @@ struct key_type key_type_ceph = {
.preparse = ceph_key_preparse,
.free_preparse = ceph_key_free_preparse,
.instantiate = generic_key_instantiate,
- .match = ceph_key_match,
+ .match = user_match,
.destroy = ceph_key_destroy,
};