mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +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:
@@ -554,10 +554,7 @@ netdev_rxq_open(struct netdev *netdev, struct netdev_rxq **rxp, int id)
|
|||||||
rx->queue_id = id;
|
rx->queue_id = id;
|
||||||
error = netdev->netdev_class->rxq_construct(rx);
|
error = netdev->netdev_class->rxq_construct(rx);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
ovs_mutex_lock(&netdev_mutex);
|
netdev_ref(netdev);
|
||||||
netdev->ref_cnt++;
|
|
||||||
ovs_mutex_unlock(&netdev_mutex);
|
|
||||||
|
|
||||||
*rxp = rx;
|
*rxp = rx;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user