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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user