diff options
author | David Howells <dhowells@redhat.com> | 2014-07-18 18:56:35 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-07-22 21:46:17 +0100 |
commit | f9167789df53f22af771fb6690a3d36aa21d74c5 (patch) | |
tree | b57ff2ec18945f20c113150c4d6d126812da7b8b /fs/nfs/idmap.c | |
parent | 4d8c0250b841159b128785f7a7efbaff40cc8501 (diff) | |
download | linux-f9167789df53f22af771fb6690a3d36aa21d74c5.tar.gz linux-f9167789df53f22af771fb6690a3d36aa21d74c5.tar.bz2 linux-f9167789df53f22af771fb6690a3d36aa21d74c5.zip |
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/nfs/idmap.c')
-rw-r--r-- | fs/nfs/idmap.c | 8 |
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) static struct key_type key_type_id_resolver = { .name = "id_resolver", - .instantiate = user_instantiate, + .preparse = user_preparse, + .free_preparse = user_free_preparse, + .instantiate = generic_key_instantiate, .match = user_match, .revoke = user_revoke, .destroy = user_destroy, @@ -394,7 +396,9 @@ static const struct rpc_pipe_ops idmap_upcall_ops = { static struct key_type key_type_id_resolver_legacy = { .name = "id_legacy", - .instantiate = user_instantiate, + .preparse = user_preparse, + .free_preparse = user_free_preparse, + .instantiate = generic_key_instantiate, .match = user_match, .revoke = user_revoke, .destroy = user_destroy, |