diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2015-02-28 14:18:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-01 22:31:02 -0500 |
commit | ed6cfcc5fdf2ebca320b6f74c836e555e18216e1 (patch) | |
tree | 004638600297de1f56cef2fc075ab1a7c8f52e26 /drivers/hv/channel.c | |
parent | d15a0301c4157884d1a48a5d76b9ac3e36d71242 (diff) |
Drivers: hv: vmbus: Introduce a function to remove a rescinded offer
In response to a rescind message, we need to remove the channel and the
corresponding device. Cleanup this code path by factoring out the code
to remove a channel.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/channel.c')
-rw-r--r-- | drivers/hv/channel.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index bf0cf8f3bcaf..9b79aca7e565 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c | |||
@@ -501,6 +501,15 @@ static int vmbus_close_internal(struct vmbus_channel *channel) | |||
501 | put_cpu(); | 501 | put_cpu(); |
502 | } | 502 | } |
503 | 503 | ||
504 | /* | ||
505 | * If the channel has been rescinded; process device removal. | ||
506 | */ | ||
507 | if (channel->rescind) { | ||
508 | hv_process_channel_removal(channel, | ||
509 | channel->offermsg.child_relid); | ||
510 | return 0; | ||
511 | } | ||
512 | |||
504 | /* Send a closing message */ | 513 | /* Send a closing message */ |
505 | 514 | ||
506 | msg = &channel->close_msg.msg; | 515 | msg = &channel->close_msg.msg; |