diff options
author | David Howells <dhowells@redhat.com> | 2014-07-22 16:51:20 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-07-22 16:51:20 -0400 |
commit | a19e3c22b34ae599eafd9fd05c887fc8e7ec2e3a (patch) | |
tree | 44a93a6da7868c58606f39421870b32a920b3e77 /fs | |
parent | 32c2e6752ff0f48fe03b9e1c7c64bde580a840d2 (diff) | |
parent | f1dcde91a3503f68ef209667a8798ead2b50b02a (diff) |
Merge tag 'keys-preparse-1-20140722' into keys-next
Here are a set of changes that make all but encrypted and trusted keys use
preparsing. Unfortunately, encrypted and trusted keys incorrectly use the
update op to alter a key, so other changes will need to be made for them.
These changes permit payload parsing when instantiating or updating a key to be
done before locks are taken and to determine the amount of quota that will be
required in advance. The latter will make it possible to do LRU discard before
any locks are taken.
Signed-off-by: David Howells <dhowells@redhat.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) | |||
174 | 174 | ||
175 | static struct key_type key_type_id_resolver = { | 175 | static 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 | ||
395 | static struct key_type key_type_id_resolver_legacy = { | 397 | static 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, |