2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-21 14:49:41 +00:00

netdev: Reuse netdev_ref() in netdev_rxq_open().

netdev_rxq_open() open-codes much of netdev_ref(), so re-use that
function instead.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Joe Stringer
2014-05-02 11:51:07 +12:00
parent 04c881eb64
commit a17ceb1bc4

View File

@@ -554,10 +554,7 @@ netdev_rxq_open(struct netdev *netdev, struct netdev_rxq **rxp, int id)
rx->queue_id = id;
error = netdev->netdev_class->rxq_construct(rx);
if (!error) {
ovs_mutex_lock(&netdev_mutex);
netdev->ref_cnt++;
ovs_mutex_unlock(&netdev_mutex);
netdev_ref(netdev);
*rxp = rx;
return 0;
}