write_lock(&keyring->lock); keyring->payload.subscriptions = NULL; write_unlock(&keyring->lock); 
rcu_assign_pointer(keyring->payload.subscriptions, NULL); 
int keyring_clear(struct key *keyring){	struct keyring_list *klist;	int loop, ret;	ret = -ENOTDIR;	if (keyring->type == &key_type_keyring) {		/* detach the pointer block with the locks held */		down_write(&keyring->sem);		klist = keyring->payload.subscriptions;		if (klist) {			/* adjust the quota */			key_payload_reserve(keyring,					    sizeof(struct keyring_list));			write_lock(&keyring->lock);			keyring->payload.subscriptions = NULL;			write_unlock(&keyring->lock);		}		up_write(&keyring->sem);		/* free the keys after the locks have been dropped */		if (klist) {			for (loop = klist->nkeys - 1; loop >= 0; loop--)				key_put(klist->keys[loop]);			kfree(klist);		}		ret = 0;	}	return ret;} /* end keyring_clear() */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/76d8aeabfeb1c42641a81c44280177b9a08670d8/keyring.c/clean/security/keys/keyring.c