[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1314904788-32746-7-git-send-email-haiyangz@microsoft.com>
Date: Thu, 1 Sep 2011 12:19:44 -0700
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: haiyangz@...rosoft.com, hjanssen@...rosoft.com, kys@...rosoft.com,
gregkh@...e.de, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, virtualization@...ts.osdl.org
Subject: [PATCH 06/10] staging: hv: fix counting of #outstanding-sends in failed sends
If the packet failed to be sent, we shouldn't count it as the
number of outstanding sends.
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
---
drivers/staging/hv/netvsc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c
index 82b129b..efbc8a0 100644
--- a/drivers/staging/hv/netvsc.c
+++ b/drivers/staging/hv/netvsc.c
@@ -494,8 +494,9 @@ int netvsc_send(struct hv_device *device,
if (ret != 0)
netdev_err(ndev, "Unable to send packet %p ret %d\n",
packet, ret);
+ else
+ atomic_inc(&net_device->num_outstanding_sends);
- atomic_inc(&net_device->num_outstanding_sends);
return ret;
}
--
1.6.3.2
--
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