Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2371cd90 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Martin K. Petersen
Browse files

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: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ddccd952
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -332,7 +332,6 @@ static struct vmbus_channel *alloc_channel(void)
	if (!channel)
		return NULL;

	spin_lock_init(&channel->inbound_lock);
	spin_lock_init(&channel->lock);

	INIT_LIST_HEAD(&channel->sc_list);
+3 −5
Original line number Diff line number Diff line
@@ -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);
+0 −1
Original line number Diff line number Diff line
@@ -744,7 +744,6 @@ struct vmbus_channel {
	u32 ringbuffer_pagecount;
	struct hv_ring_buffer_info outbound;	/* send to parent */
	struct hv_ring_buffer_info inbound;	/* receive from parent */
	spinlock_t inbound_lock;

	struct vmbus_close_msg close_msg;