diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-15 14:48:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:48 -0700 |
commit | 54411c425fe0f5f8a5fcc1f3098693419ae87306 (patch) | |
tree | 9a230b556dd3e5390f0cd1e4397e3b63e415ede3 /drivers/staging/hv/ChannelMgmt.c | |
parent | 8c69f52ab3d918be9d91c8202e5321421876ea50 (diff) | |
download | op-kernel-dev-54411c425fe0f5f8a5fcc1f3098693419ae87306.zip op-kernel-dev-54411c425fe0f5f8a5fcc1f3098693419ae87306.tar.gz |
Staging: hv: make Channel->InboundLock a real spinlock
Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.
I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath. It should be reviewed
later.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/ChannelMgmt.c')
-rw-r--r-- | drivers/staging/hv/ChannelMgmt.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c index a19ff89..7a0fd09 100644 --- a/drivers/staging/hv/ChannelMgmt.c +++ b/drivers/staging/hv/ChannelMgmt.c @@ -149,17 +149,11 @@ VMBUS_CHANNEL* AllocVmbusChannel(void) return NULL; } - channel->InboundLock = SpinlockCreate(); - if (!channel->InboundLock) - { - kfree(channel); - return NULL; - } + spin_lock_init(&channel->inbound_lock); channel->PollTimer = TimerCreate(VmbusChannelOnTimer, channel); if (!channel->PollTimer) { - SpinlockClose(channel->InboundLock); kfree(channel); return NULL; } @@ -169,7 +163,6 @@ VMBUS_CHANNEL* AllocVmbusChannel(void) if (!channel->ControlWQ) { TimerClose(channel->PollTimer); - SpinlockClose(channel->InboundLock); kfree(channel); return NULL; } @@ -212,7 +205,6 @@ Description: --*/ void FreeVmbusChannel(VMBUS_CHANNEL* Channel) { - SpinlockClose(Channel->InboundLock); TimerClose(Channel->PollTimer); // We have to release the channel's workqueue/thread in the vmbus's workqueue/thread context |