|
@@ -1206,13 +1206,13 @@ static int storvsc_connect_to_vsp(struct hv_device *device, u32 ring_size,
|
|
|
static int storvsc_dev_remove(struct hv_device *device)
|
|
|
{
|
|
|
struct storvsc_device *stor_device;
|
|
|
- unsigned long flags;
|
|
|
|
|
|
stor_device = hv_get_drvdata(device);
|
|
|
|
|
|
- spin_lock_irqsave(&device->channel->inbound_lock, flags);
|
|
|
stor_device->destroy = true;
|
|
|
- spin_unlock_irqrestore(&device->channel->inbound_lock, flags);
|
|
|
+
|
|
|
+ /* Make sure flag is set before waiting */
|
|
|
+ wmb();
|
|
|
|
|
|
/*
|
|
|
* At this point, all outbound traffic should be disable. We
|
|
@@ -1229,9 +1229,7 @@ static int storvsc_dev_remove(struct hv_device *device)
|
|
|
* we have drained - to drain the outgoing packets, we need to
|
|
|
* allow incoming packets.
|
|
|
*/
|
|
|
- spin_lock_irqsave(&device->channel->inbound_lock, flags);
|
|
|
hv_set_drvdata(device, NULL);
|
|
|
- spin_unlock_irqrestore(&device->channel->inbound_lock, flags);
|
|
|
|
|
|
/* Close the channel */
|
|
|
vmbus_close(device->channel);
|