diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2015-02-28 11:18:17 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-01 19:31:02 -0800 |
commit | ed6cfcc5fdf2ebca320b6f74c836e555e18216e1 (patch) | |
tree | 004638600297de1f56cef2fc075ab1a7c8f52e26 /drivers/hv/channel.c | |
parent | d15a0301c4157884d1a48a5d76b9ac3e36d71242 (diff) | |
download | talos-op-linux-ed6cfcc5fdf2ebca320b6f74c836e555e18216e1.tar.gz talos-op-linux-ed6cfcc5fdf2ebca320b6f74c836e555e18216e1.zip |
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) put_cpu(); } + /* + * If the channel has been rescinded; process device removal. + */ + if (channel->rescind) { + hv_process_channel_removal(channel, + channel->offermsg.child_relid); + return 0; + } + /* Send a closing message */ msg = &channel->close_msg.msg; |