diff options
author | Greg Kroah-Hartman | 2009-07-15 23:57:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2009-09-15 21:01:48 +0200 |
commit | 0f5e44ca6e777660af6b0eb44d4787563932eda8 (patch) | |
tree | 63e1c8598cc093682747da8587292a638a44e68e /drivers/staging/hv/Channel.c | |
parent | Staging: hv: make gVmbusConnection.ChannelMsgLock a real spinlock (diff) | |
download | kernel-qcow2-linux-0f5e44ca6e777660af6b0eb44d4787563932eda8.tar.gz kernel-qcow2-linux-0f5e44ca6e777660af6b0eb44d4787563932eda8.tar.xz kernel-qcow2-linux-0f5e44ca6e777660af6b0eb44d4787563932eda8.zip |
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/Channel.c')
-rw-r--r-- | drivers/staging/hv/Channel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index 3f48ac7cd11f..196c7a6e549e 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c @@ -686,6 +686,7 @@ VmbusChannelClose( int ret=0; VMBUS_CHANNEL_CLOSE_CHANNEL* msg; VMBUS_CHANNEL_MSGINFO* info; + unsigned long flags; DPRINT_ENTER(VMBUS); @@ -729,9 +730,9 @@ VmbusChannelClose( // since the caller will free the channel if (Channel->State == CHANNEL_OPEN_STATE) { - SpinlockAcquire(gVmbusConnection.ChannelLock); + spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); REMOVE_ENTRY_LIST(&Channel->ListEntry); - SpinlockRelease(gVmbusConnection.ChannelLock); + spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); FreeVmbusChannel(Channel); } |