/* GetChannelFromRelId - Get the channel object given its child relative id (ie channel id)  */
struct vmbus_channel* GetChannelFromRelId(u32 relId)
/* GetChannelFromRelId - Get the channel object given its child relative id (ie channel id)  */
struct vmbus_channel* GetChannelFromRelId(u32 relId)
{
	struct vmbus_channel *channel;
	struct vmbus_channel *foundChannel  = NULL;
	unsigned long flags;
	spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
	list_for_each_entry(channel, &gVmbusConnection.ChannelList, ListEntry) {
		if (channel->OfferMsg.ChildRelId == relId) {
			foundChannel = channel;
			break;
		}
	}
	spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
	return foundChannel;
}