diff options
Diffstat (limited to 'drivers/hv/channel.c')
-rw-r--r-- | drivers/hv/channel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index efd5db743319..894b67ac2cae 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c | |||
@@ -640,6 +640,7 @@ void vmbus_close(struct vmbus_channel *channel) | |||
640 | */ | 640 | */ |
641 | return; | 641 | return; |
642 | } | 642 | } |
643 | mutex_lock(&vmbus_connection.channel_mutex); | ||
643 | /* | 644 | /* |
644 | * Close all the sub-channels first and then close the | 645 | * Close all the sub-channels first and then close the |
645 | * primary channel. | 646 | * primary channel. |
@@ -648,16 +649,15 @@ void vmbus_close(struct vmbus_channel *channel) | |||
648 | cur_channel = list_entry(cur, struct vmbus_channel, sc_list); | 649 | cur_channel = list_entry(cur, struct vmbus_channel, sc_list); |
649 | vmbus_close_internal(cur_channel); | 650 | vmbus_close_internal(cur_channel); |
650 | if (cur_channel->rescind) { | 651 | if (cur_channel->rescind) { |
651 | mutex_lock(&vmbus_connection.channel_mutex); | 652 | hv_process_channel_removal( |
652 | hv_process_channel_removal(cur_channel, | ||
653 | cur_channel->offermsg.child_relid); | 653 | cur_channel->offermsg.child_relid); |
654 | mutex_unlock(&vmbus_connection.channel_mutex); | ||
655 | } | 654 | } |
656 | } | 655 | } |
657 | /* | 656 | /* |
658 | * Now close the primary. | 657 | * Now close the primary. |
659 | */ | 658 | */ |
660 | vmbus_close_internal(channel); | 659 | vmbus_close_internal(channel); |
660 | mutex_unlock(&vmbus_connection.channel_mutex); | ||
661 | } | 661 | } |
662 | EXPORT_SYMBOL_GPL(vmbus_close); | 662 | EXPORT_SYMBOL_GPL(vmbus_close); |
663 | 663 | ||