Commit bdbc4970 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: storvsc: Do not aquire an unnecessary reference on stor_device

On entry into storvsc_on_io_completion() we have already acquired a reference
on the stor_device; there is no need to acquire an additional reference here.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0fb07a87
...@@ -232,9 +232,7 @@ static void storvsc_on_io_completion(struct hv_device *device, ...@@ -232,9 +232,7 @@ static void storvsc_on_io_completion(struct hv_device *device,
struct storvsc_device *stor_device; struct storvsc_device *stor_device;
struct vstor_packet *stor_pkt; struct vstor_packet *stor_pkt;
stor_device = must_get_stor_device(device); stor_device = (struct storvsc_device *)device->ext;
if (!stor_device)
return;
stor_pkt = &request->vstor_packet; stor_pkt = &request->vstor_packet;
...@@ -279,7 +277,6 @@ static void storvsc_on_io_completion(struct hv_device *device, ...@@ -279,7 +277,6 @@ static void storvsc_on_io_completion(struct hv_device *device,
wake_up(&stor_device->waiting_to_drain); wake_up(&stor_device->waiting_to_drain);
put_stor_device(device);
} }
static void storvsc_on_receive(struct hv_device *device, static void storvsc_on_receive(struct hv_device *device,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment