Staging: hv: vmbus: Cleanup the code in process_chn_event()
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 31 Aug 2011 21:35:57 +0000 (14:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 18:53:51 +0000 (11:53 -0700)
commit24326039b9685e8bfb1532932e18cb458f2a3517
tree469b90d4fcf688873329652265e7fe719f2b63a8
parent7341d908af307a34098a9da52f49037d815c868f
Staging: hv: vmbus: Cleanup the code in process_chn_event()

A channel in Hyper-V is equivalent to a device. Thus, a channel is
persistent once it is presented to the guest, even if the driver
managing this device is unloaded. By checking and invoking the driver
specific callback function under the protection of the channel
inbound_lock, we can properly deal with racing driver unloads since an
unloading driver sets the callback to NULL under the protection of this
inbound_lock.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/connection.c