net: Fix rxq ref counting
The rx->count reference is used to track reference counts to the number of rx-queue kobjects created for the device. This patch eliminates initialization of the counter in netif_alloc_rx_queues and instead increments the counter each time a kobject is created. This is now symmetric with the decrement that is done when an object is released. Signed-off-by: Tom Herbert <therbert@google.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a131d82266
commit
4315d834c1
@ -5024,7 +5024,6 @@ static int netif_alloc_rx_queues(struct net_device *dev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
dev->_rx = rx;
|
||||
atomic_set(&rx->count, count);
|
||||
|
||||
/*
|
||||
* Set a pointer to first element in the array which holds the
|
||||
|
Reference in New Issue
Block a user