error: 
error: 
int key_unlink(struct key *keyring, struct key *key){	struct keyring_list *klist;	int loop, ret;	key_check(keyring);	key_check(key);	ret = -ENOTDIR;	if (keyring->type != &key_type_keyring)		goto error;	down_write(&keyring->sem);	klist = keyring->payload.subscriptions;	if (klist) {		/* search the keyring for the key */		for (loop = 0; loop < klist->nkeys; loop++)			if (klist->keys[loop] == key)				goto key_is_present;	}	up_write(&keyring->sem);	ret = -ENOENT;	goto error; key_is_present:	/* adjust the user's quota */	key_payload_reserve(keyring,			    keyring->datalen - KEYQUOTA_LINK_BYTES);	/* shuffle down the key pointers	 * - it might be worth shrinking the allocated memory, but that runs	 *   the risk of ENOMEM as we would have to copy	 */	write_lock(&keyring->lock);	klist->nkeys--;	if (loop < klist->nkeys)		memcpy(&klist->keys[loop],		       &klist->keys[loop + 1],		       (klist->nkeys - loop) * sizeof(struct key *));	write_unlock(&keyring->lock);	up_write(&keyring->sem);	key_put(key);	ret = 0; error:	return ret;} /* end key_unlink() */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/76d8aeabfeb1c42641a81c44280177b9a08670d8/keyring.c/clean/security/keys/keyring.c