/* A socket has left a multicast group on device dev  */
void ip_mc_dec_group(struct in_device *in_dev, __be32 addr)
/* A socket has left a multicast group on device dev  */
void ip_mc_dec_group(struct in_device *in_dev, __be32 addr)
{
	struct ip_mc_list *i, **ip;
	ASSERT_RTNL();
	for (ip=&in_dev->mc_list; (i=*ip)!=NULL; ip=&i->next) {
		if (i->multiaddr == addr) {
			if (--i->users == 0) {
				write_lock_bh(&in_dev->mc_list_lock);
				*ip = i->next;
				in_dev->mc_count--;
				write_unlock_bh(&in_dev->mc_list_lock);
				igmp_group_dropped(i);
				if (!in_dev->dead)
					ip_rt_multicast_event(in_dev);
				ip_ma_put(i);
				return;
			}
			break;
		}
	}
}