2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00

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>
This commit is contained in:
Haiyang Zhang 2011-09-01 12:19:44 -07:00 committed by Greg Kroah-Hartman
parent 692e084e77
commit 7db1d946c4

View File

@ -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);
return ret;
}