diff options
author | David Howells <dhowells@redhat.com> | 2014-07-18 19:56:35 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-07-22 22:46:17 +0200 |
commit | f9167789df53f22af771fb6690a3d36aa21d74c5 (patch) | |
tree | b57ff2ec18945f20c113150c4d6d126812da7b8b /fs | |
parent | KEYS: Call ->free_preparse() even after ->preparse() returns an error (diff) | |
download | linux-f9167789df53f22af771fb6690a3d36aa21d74c5.tar.xz 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')
-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, |