Drivers: hv: vmbus: fix rescind-offer handling for device without a driver
[deliverable/linux.git] / drivers / hv / channel_mgmt.c
index dc4fb0bccb8d87970f625238872e7f5f0f6ee72a..7903acc3403e99c9722e945d7634482b7ce15aea 100644 (file)
@@ -191,6 +191,8 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
        if (channel == NULL)
                return;
 
+       BUG_ON(!channel->rescind);
+
        if (channel->target_cpu != get_cpu()) {
                put_cpu();
                smp_call_function_single(channel->target_cpu,
@@ -230,9 +232,7 @@ void vmbus_free_channels(void)
 
        list_for_each_entry_safe(channel, tmp, &vmbus_connection.chn_list,
                listentry) {
-               /* if we don't set rescind to true, vmbus_close_internal()
-                * won't invoke hv_process_channel_removal().
-                */
+               /* hv_process_channel_removal() needs this */
                channel->rescind = true;
 
                vmbus_device_unregister(channel->device_obj);
This page took 0.027038 seconds and 5 git commands to generate.