From: K. Y. Srinivasan Date: Mon, 6 Jun 2011 22:49:35 +0000 (-0700) Subject: Staging: hv: vmbus: Don't free the channel when the channel is closed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=604a1eb0eb67c38e29f9efd8d20668904f93b50c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Staging: hv: vmbus: Don't free the channel when the channel is closed When the driver unloads, the device must persist. A channel represents the device and so we should not free the channel when the channel is closed as part of the driver unloading. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c index f655e59a9a8f..aca9ac8cc376 100644 --- a/drivers/staging/hv/channel.c +++ b/drivers/staging/hv/channel.c @@ -552,7 +552,6 @@ void vmbus_close(struct vmbus_channel *channel) { struct vmbus_channel_close_channel *msg; struct vmbus_channel_msginfo *info; - unsigned long flags; int ret; /* Stop callback and cancel the timer asap */ @@ -591,19 +590,6 @@ void vmbus_close(struct vmbus_channel *channel) kfree(info); - /* - * If we are closing the channel during an error path in - * opening the channel, don't free the channel since the - * caller will free the channel - */ - - if (channel->state == CHANNEL_OPEN_STATE) { - spin_lock_irqsave(&vmbus_connection.channel_lock, flags); - list_del(&channel->listentry); - spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags); - - free_channel(channel); - } } EXPORT_SYMBOL_GPL(vmbus_close);