Drivers: hv: utils: introduce HVUTIL_TRANSPORT_DESTROY mode
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 15 Dec 2015 03:01:55 +0000 (19:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Dec 2015 03:27:30 +0000 (19:27 -0800)
commita15025660d4703a8b37290a14734cb4a84875770
tree26ef40f5244b4f8fafef7a83a5c8c1eacb1649ed
parenta72f3a4ccff22de879a1f599210ecdd9bd483a43
Drivers: hv: utils: introduce HVUTIL_TRANSPORT_DESTROY mode

When Hyper-V host asks us to remove some util driver by closing the
appropriate channel there is no easy way to force the current file
descriptor holder to hang up but we can start to respond -EBADF to all
operations asking it to exit gracefully.

As we're setting hvt->mode from two separate contexts now we need to use
a proper locking.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_utils_transport.c
drivers/hv/hv_utils_transport.h