Skip to content

Commit

Permalink
Staging: hv: storvsc: Do not aquire an unnecessary reference on stor_…
Browse files Browse the repository at this point in the history
…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: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Aug 29, 2011
1 parent 0fb07a8 commit bdbc497
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/staging/hv/storvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,7 @@ static void storvsc_on_io_completion(struct hv_device *device,
struct storvsc_device *stor_device;
struct vstor_packet *stor_pkt;

stor_device = must_get_stor_device(device);
if (!stor_device)
return;
stor_device = (struct storvsc_device *)device->ext;

stor_pkt = &request->vstor_packet;

Expand Down Expand Up @@ -279,7 +277,6 @@ static void storvsc_on_io_completion(struct hv_device *device,
wake_up(&stor_device->waiting_to_drain);


put_stor_device(device);
}

static void storvsc_on_receive(struct hv_device *device,
Expand Down

0 comments on commit bdbc497

Please sign in to comment.