diff options
author | Joe Stringer <joestringer@nicira.com> | 2014-05-02 11:51:07 +1200 |
---|---|---|
committer | Joe Stringer <joestringer@nicira.com> | 2014-05-05 11:20:25 +1200 |
commit | a17ceb1bc48a37ab0c28734a80b23c391694e5f4 (patch) | |
tree | e769bdeb9990b9ab4b1c3c0b3707dae1f981fbb1 /lib/netdev.c | |
parent | 04c881eb6441fff2e91c9b9e23502bc554c0f437 (diff) | |
download | openvswitch-a17ceb1bc48a37ab0c28734a80b23c391694e5f4.tar.gz |
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>
Diffstat (limited to 'lib/netdev.c')
-rw-r--r-- | lib/netdev.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/netdev.c b/lib/netdev.c index 9aaf10757..2466c2bfb 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -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; } |