/* This is called with mon_lock taken, so we can decrement mbus->ref.  */
void mon_reader_del(struct mon_bus *mbus, struct mon_reader *r)
/* This is called with mon_lock taken, so we can decrement mbus->ref.  */
void mon_reader_del(struct mon_bus *mbus, struct mon_reader *r)
{
	unsigned long flags;
	spin_lock_irqsave(&mbus->lock, flags);
	list_del(&r->r_link);
	--mbus->nreaders;
	if (mbus->nreaders == 0)
		mon_stop(mbus);
	spin_unlock_irqrestore(&mbus->lock, flags);
	kref_put(&mbus->ref, mon_bus_drop);
}