diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-15 14:57:16 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:48 -0700 |
commit | 0f5e44ca6e777660af6b0eb44d4787563932eda8 (patch) | |
tree | 63e1c8598cc093682747da8587292a638a44e68e /drivers/staging/hv/Connection.c | |
parent | dd0813b6f51b33529f37ba43334ac65e82d772e8 (diff) |
Staging: hv: make gVmbusConnection.ChannelLock 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/Connection.c')
-rw-r--r-- | drivers/staging/hv/Connection.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c index 13e164d1453..78889bdda93 100644 --- a/drivers/staging/hv/Connection.c +++ b/drivers/staging/hv/Connection.c @@ -69,7 +69,7 @@ VmbusConnect( spin_lock_init(&gVmbusConnection.channelmsg_lock); INITIALIZE_LIST_HEAD(&gVmbusConnection.ChannelList); - gVmbusConnection.ChannelLock = SpinlockCreate(); + spin_lock_init(&gVmbusConnection.channel_lock); // Setup the vmbus event connection for channel interrupt abstraction stuff gVmbusConnection.InterruptPage = PageAlloc(1); @@ -156,7 +156,6 @@ Cleanup: gVmbusConnection.ConnectState = Disconnected; WorkQueueClose(gVmbusConnection.WorkQueue); - SpinlockClose(gVmbusConnection.ChannelLock); if (gVmbusConnection.InterruptPage) { @@ -258,8 +257,9 @@ GetChannelFromRelId( VMBUS_CHANNEL* foundChannel=NULL; LIST_ENTRY* anchor; LIST_ENTRY* curr; + unsigned long flags; - SpinlockAcquire(gVmbusConnection.ChannelLock); + spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelList) { channel = CONTAINING_RECORD(curr, VMBUS_CHANNEL, ListEntry); @@ -270,7 +270,7 @@ GetChannelFromRelId( break; } } - SpinlockRelease(gVmbusConnection.ChannelLock); + spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); return foundChannel; } |