[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1310752065-27895-76-git-send-email-kys@microsoft.com>
Date: Fri, 15 Jul 2011 10:47:04 -0700
From: "K. Y. Srinivasan" <kys@...rosoft.com>
To: gregkh@...e.de, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, virtualization@...ts.osdl.org
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>
Subject: [PATCH 076/117] 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: K. Y. Srinivasan <kys@...rosoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
---
drivers/staging/hv/storvsc.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 8c62829..cd38cd6 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -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;
@@ -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,
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists