/* Fail a join request if it is still active - at the head of the pending queue.  */
static void process_join_error(struct mcast_group *group, int status)
/* Fail a join request if it is still active - at the head of the pending queue.  */
static void process_join_error(struct mcast_group *group, int status)
{
	struct mcast_member *member;
	int ret;
	spin_lock_irq(&group->lock);
	member = list_entry(group->pending_list.next,
			    struct mcast_member, list);
	if (group->last_join == member) {
		atomic_inc(&member->refcount);
		list_del_init(&member->list);
		spin_unlock_irq(&group->lock);
		ret = member->multicast.callback(status, &member->multicast);
		deref_member(member);
		if (ret)
			ib_sa_free_multicast(&member->multicast);
	} else
		spin_unlock_irq(&group->lock);
}