Lines Matching refs:type
224 struct key *key_alloc(struct key_type *type, const char *desc, in key_alloc() argument
238 if (type->vet_description) { in key_alloc()
239 ret = type->vet_description(desc); in key_alloc()
247 quotalen = desclen + 1 + type->def_datalen; in key_alloc()
284 key->index_key.type = type; in key_alloc()
289 lockdep_set_class(&key->sem, &type->lock_class); in key_alloc()
292 key->datalen = type->def_datalen; in key_alloc()
440 ret = key->type->instantiate(key, prep); in __key_instantiate_and_link()
507 prep.quotalen = key->type->def_datalen; in key_instantiate_and_link()
509 if (key->type->preparse) { in key_instantiate_and_link()
510 ret = key->type->preparse(&prep); in key_instantiate_and_link()
527 ret = keyres->check(keyring, key->type, &prep.payload, in key_instantiate_and_link()
541 if (key->type->preparse) in key_instantiate_and_link()
542 key->type->free_preparse(&prep); in key_instantiate_and_link()
697 struct key_type *key_type_lookup(const char *type) in key_type_lookup() argument
706 if (strcmp(ktype->name, type) == 0) in key_type_lookup()
760 if (!key->type->update) in __key_update()
765 ret = key->type->update(key, prep); in __key_update()
809 const char *type, in key_create_or_update() argument
829 index_key.type = key_type_lookup(type); in key_create_or_update()
830 if (IS_ERR(index_key.type)) { in key_create_or_update()
836 if (!index_key.type->instantiate || in key_create_or_update()
837 (!index_key.description && !index_key.type->preparse)) in key_create_or_update()
848 if (keyring->type != &key_type_keyring) in key_create_or_update()
854 prep.quotalen = index_key.type->def_datalen; in key_create_or_update()
856 if (index_key.type->preparse) { in key_create_or_update()
857 ret = index_key.type->preparse(&prep); in key_create_or_update()
884 ret = restrict_link->check(keyring, index_key.type, in key_create_or_update()
904 if (index_key.type->update) { in key_create_or_update()
915 if (index_key.type->read) in key_create_or_update()
918 if (index_key.type == &key_type_keyring || in key_create_or_update()
919 index_key.type->update) in key_create_or_update()
924 key = key_alloc(index_key.type, index_key.description, in key_create_or_update()
944 if (index_key.type->preparse) in key_create_or_update()
945 index_key.type->free_preparse(&prep); in key_create_or_update()
947 key_type_put(index_key.type); in key_create_or_update()
999 if (!key->type->update) in key_update()
1005 prep.quotalen = key->type->def_datalen; in key_update()
1007 if (key->type->preparse) { in key_update()
1008 ret = key->type->preparse(&prep); in key_update()
1015 ret = key->type->update(key, &prep); in key_update()
1023 if (key->type->preparse) in key_update()
1024 key->type->free_preparse(&prep); in key_update()
1051 key->type->revoke) in key_revoke()
1052 key->type->revoke(key); in key_revoke()