Skip to content

Commit

Permalink
staging: hv: fix counting of #outstanding-sends in failed sends
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
haiyangz authored and gregkh committed Sep 6, 2011
1 parent 692e084 commit 7db1d94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/hv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7db1d94

Please sign in to comment.