diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2017-05-18 18:18:12 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-13 02:48:05 +0200 |
commit | 2371cd90abe3fa1b88e15111abf2cc0a26db6e52 (patch) | |
tree | 4f1ea825a44b886bd7d86b7f63b09e11f59c7d29 /drivers/scsi/storvsc_drv.c | |
parent | scsi: storvsc: use in place iterator function (diff) | |
download | linux-2371cd90abe3fa1b88e15111abf2cc0a26db6e52.tar.xz linux-2371cd90abe3fa1b88e15111abf2cc0a26db6e52.zip |
scsi: storvsc: remove unnecessary channel inbound lock
In storvsc driver, inbound messages do not go through inbound lock. The
only effect of this lock was is to provide a barrier for connect and
remove logic.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/storvsc_drv.c')
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index f8a1649e4c63..8d955db6424f 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -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); |