diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2011-09-01 19:19:44 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-06 18:56:18 (GMT) |
commit | 7db1d946c4db748b631fe4885110349cc259987f (patch) | |
tree | b8c1fdaa05bd2ed11e915f8e250acde0f6e58e98 | |
parent | 692e084e773b76c30a3e5d823db131ed1a15924a (diff) | |
download | linux-7db1d946c4db748b631fe4885110349cc259987f.tar.xz |
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@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | 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; } |