aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-01-24 00:30:58 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:02:11 -0800
commit06f0511df1b3b32fc8e0840514d4b207150f1fa7 (patch)
tree437fddbd668d611d4249d48fa806c36c05889767 /net/core/neighbour.c
parent[ARP]: Remove forward declaration of neigh_changeaddr. (diff)
downloadlinux-dev-06f0511df1b3b32fc8e0840514d4b207150f1fa7.tar.xz
linux-dev-06f0511df1b3b32fc8e0840514d4b207150f1fa7.zip
[ARP]: neigh_parms_put(destroy) are essentially local to core/neighbour.c.
Make them static. [ Moved the inline before, instead of after, call sites. -DaveM ] Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index a8be5ef13337..a16cf1ec5e5e 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -577,6 +577,13 @@ static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
return -ENOENT;
}
+static void neigh_parms_destroy(struct neigh_parms *parms);
+
+static inline void neigh_parms_put(struct neigh_parms *parms)
+{
+ if (atomic_dec_and_test(&parms->refcnt))
+ neigh_parms_destroy(parms);
+}
/*
* neighbour must already be out of the table;
@@ -1350,7 +1357,7 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
NEIGH_PRINTK1("neigh_parms_release: not found\n");
}
-void neigh_parms_destroy(struct neigh_parms *parms)
+static void neigh_parms_destroy(struct neigh_parms *parms)
{
release_net(parms->net);
kfree(parms);