Lines Matching refs:key
27 struct key *afs_request_key(struct afs_cell *cell) in afs_request_key()
29 struct key *key; in afs_request_key() local
34 key = request_key(&key_type_rxrpc, cell->anonymous_key->description, in afs_request_key()
36 if (IS_ERR(key)) { in afs_request_key()
37 if (PTR_ERR(key) != -ENOKEY) { in afs_request_key()
38 _leave(" = %ld", PTR_ERR(key)); in afs_request_key()
39 return key; in afs_request_key()
47 _leave(" = {%x} [auth]", key_serial(key)); in afs_request_key()
48 return key; in afs_request_key()
62 key_put(permits->permits[i].key); in afs_permits_rcu()
105 h += (unsigned long)permits->permits[i].key / sizeof(void *); in afs_hash_permits()
118 void afs_cache_permit(struct afs_vnode *vnode, struct key *key, in afs_cache_permit() argument
128 vnode->fid.vid, vnode->fid.vnode, key_serial(key), caller_access); in afs_cache_permit()
139 if (permits->permits[i].key < key) in afs_cache_permit()
141 if (permits->permits[i].key > key) in afs_cache_permit()
207 if (j == i && permits->permits[i].key > key) { in afs_cache_permit()
208 new->permits[j].key = key; in afs_cache_permit()
212 new->permits[j].key = permits->permits[i].key; in afs_cache_permit()
219 new->permits[j].key = key; in afs_cache_permit()
245 key_get(new->permits[i].key); in afs_cache_permit()
283 int afs_check_permit(struct afs_vnode *vnode, struct key *key, in afs_check_permit() argument
291 vnode->fid.vid, vnode->fid.vnode, key_serial(key)); in afs_check_permit()
294 if (key == vnode->volume->cell->anonymous_key) { in afs_check_permit()
303 if (permits->permits[i].key < key) in afs_check_permit()
305 if (permits->permits[i].key > key) in afs_check_permit()
322 ret = afs_fetch_status(vnode, key, false); in afs_check_permit()
344 struct key *key; in afs_permission() local
353 key = afs_request_key(vnode->volume->cell); in afs_permission()
354 if (IS_ERR(key)) { in afs_permission()
355 _leave(" = %ld [key]", PTR_ERR(key)); in afs_permission()
356 return PTR_ERR(key); in afs_permission()
359 ret = afs_validate(vnode, key); in afs_permission()
364 ret = afs_check_permit(vnode, key, &access); in afs_permission()
400 key_put(key); in afs_permission()
407 key_put(key); in afs_permission()