Commit 7db1d946 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Greg Kroah-Hartman

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: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 692e084e
...@@ -494,8 +494,9 @@ int netvsc_send(struct hv_device *device, ...@@ -494,8 +494,9 @@ int netvsc_send(struct hv_device *device,
if (ret != 0) if (ret != 0)
netdev_err(ndev, "Unable to send packet %p ret %d\n", netdev_err(ndev, "Unable to send packet %p ret %d\n",
packet, ret); packet, ret);
else
atomic_inc(&net_device->num_outstanding_sends); atomic_inc(&net_device->num_outstanding_sends);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment