diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-08-27 11:31:33 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-29 11:05:30 -0700 |
commit | dad76bf73fc20b42d020fe5a93dbe4b4868e7681 (patch) | |
tree | d1ce6dee63e86173b97f27796d515f31d9fdc03d /drivers/staging/hv/storvsc_drv.c | |
parent | 76c39d429d606d8f9b354ee2b1973b76c8331b1f (diff) |
Staging: hv: vmbus: Properly deal with de-registering channel callback
Ensure that we correctly handle racing invocations of the channel callback
when the channel is being closed. We do this using the channel's inbound_lock.
A side-effect of this strategy is that we avoid repeatedly picking up this lock
as we drain the inbound ring-buffer.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/storvsc_drv.c')
-rw-r--r-- | drivers/staging/hv/storvsc_drv.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index d575bc92ffc..3686d1048e3 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -352,9 +352,7 @@ static inline struct storvsc_device *get_in_stor_device( struct hv_device *device) { struct storvsc_device *stor_device; - unsigned long flags; - spin_lock_irqsave(&device->channel->inbound_lock, flags); stor_device = (struct storvsc_device *)device->ext; if (!stor_device) @@ -370,7 +368,6 @@ static inline struct storvsc_device *get_in_stor_device( stor_device = NULL; get_in_err: - spin_unlock_irqrestore(&device->channel->inbound_lock, flags); return stor_device; } |