aboutsummaryrefslogtreecommitdiffstats
path: root/fs
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:17 -0400
commitf9167789df53f22af771fb6690a3d36aa21d74c5 (patch)
treeb57ff2ec18945f20c113150c4d6d126812da7b8b /fs
parent4d8c0250b841159b128785f7a7efbaff40cc8501 (diff)
KEYS: user: Use key preparsing
Make use of key preparsing in user-defined and logon keys so that quota size determination can take place prior to keyring locking when a key is being added. Also the idmapper key types need to change to match as they use the user-defined key type routines. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Acked-by: Jeff Layton <jlayton@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/idmap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 567983d2c0eb..59b217a3266d 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -174,7 +174,9 @@ static int nfs_map_numeric_to_string(__u32 id, char *buf, size_t buflen)
174 174
175static struct key_type key_type_id_resolver = { 175static struct key_type key_type_id_resolver = {
176 .name = "id_resolver", 176 .name = "id_resolver",
177 .instantiate = user_instantiate, 177 .preparse = user_preparse,
178 .free_preparse = user_free_preparse,
179 .instantiate = generic_key_instantiate,
178 .match = user_match, 180 .match = user_match,
179 .revoke = user_revoke, 181 .revoke = user_revoke,
180 .destroy = user_destroy, 182 .destroy = user_destroy,
@@ -394,7 +396,9 @@ static const struct rpc_pipe_ops idmap_upcall_ops = {
394 396
395static struct key_type key_type_id_resolver_legacy = { 397static struct key_type key_type_id_resolver_legacy = {
396 .name = "id_legacy", 398 .name = "id_legacy",
397 .instantiate = user_instantiate, 399 .preparse = user_preparse,
400 .free_preparse = user_free_preparse,
401 .instantiate = generic_key_instantiate,
398 .match = user_match, 402 .match = user_match,
399 .revoke = user_revoke, 403 .revoke = user_revoke,
400 .destroy = user_destroy, 404 .destroy = user_destroy,