/* ipc_ids.rw_mutex (as a writer) and the spinlock for this ID are held before this function is called, and remain locked on the exit.  */
void ipc_rmid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp)
/* ipc_ids.rw_mutex (as a writer) and the spinlock for this ID are held before this function is called, and remain locked on the exit.  */
void ipc_rmid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp)
{
	int lid = ipcid_to_idx(ipcp->id);
	idr_remove(&ids->ipcs_idr, lid);
	ids->in_use--;
	ipcp->deleted = 1;
	return;
}