diff options
author | Tom Herbert <therbert@google.com> | 2010-10-07 06:09:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-08 17:34:32 -0400 |
commit | 4315d834c1496ddca977e9e22002b77c85bfec2c (patch) | |
tree | b5d36552a72ac630e7024d855e564e63db93bb6a /net/core/dev.c | |
parent | a131d82266e77b8eb8a2dab930a94ed0de9e91b0 (diff) |
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 4962c8afd606..193eafaabd88 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -5024,7 +5024,6 @@ static int netif_alloc_rx_queues(struct net_device *dev) | |||
5024 | return -ENOMEM; | 5024 | return -ENOMEM; |
5025 | } | 5025 | } |
5026 | dev->_rx = rx; | 5026 | dev->_rx = rx; |
5027 | atomic_set(&rx->count, count); | ||
5028 | 5027 | ||
5029 | /* | 5028 | /* |
5030 | * Set a pointer to first element in the array which holds the | 5029 | * Set a pointer to first element in the array which holds the |