提交 7db1d946 编写于 作者: H Haiyang Zhang 提交者: 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: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 692e084e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册