aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-01-24 03:30:58 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:02:11 -0500
commit06f0511df1b3b32fc8e0840514d4b207150f1fa7 (patch)
tree437fddbd668d611d4249d48fa806c36c05889767
parent14db4133d59e2c1bed122bf87393e2ded05e42dc (diff)
[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>
-rw-r--r--include/net/neighbour.h7
-rw-r--r--net/core/neighbour.c9
2 files changed, 8 insertions, 8 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index a0d42a54cfb2..ebbfb509822e 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -213,7 +213,6 @@ extern struct neighbour *neigh_event_ns(struct neigh_table *tbl,
213 213
214extern struct neigh_parms *neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl); 214extern struct neigh_parms *neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl);
215extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms); 215extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms);
216extern void neigh_parms_destroy(struct neigh_parms *parms);
217extern unsigned long neigh_rand_reach_time(unsigned long base); 216extern unsigned long neigh_rand_reach_time(unsigned long base);
218 217
219extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, 218extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
@@ -254,12 +253,6 @@ static inline void __neigh_parms_put(struct neigh_parms *parms)
254 atomic_dec(&parms->refcnt); 253 atomic_dec(&parms->refcnt);
255} 254}
256 255
257static inline void neigh_parms_put(struct neigh_parms *parms)
258{
259 if (atomic_dec_and_test(&parms->refcnt))
260 neigh_parms_destroy(parms);
261}
262
263static inline struct neigh_parms *neigh_parms_clone(struct neigh_parms *parms) 256static inline struct neigh_parms *neigh_parms_clone(struct neigh_parms *parms)
264{ 257{
265 atomic_inc(&parms->refcnt); 258 atomic_inc(&parms->refcnt);
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)
577 return -ENOENT; 577 return -ENOENT;
578} 578}
579 579
580static void neigh_parms_destroy(struct neigh_parms *parms);
581
582static inline void neigh_parms_put(struct neigh_parms *parms)
583{
584 if (atomic_dec_and_test(&parms->refcnt))
585 neigh_parms_destroy(parms);
586}
580 587
581/* 588/*
582 * neighbour must already be out of the table; 589 * neighbour must already be out of the table;
@@ -1350,7 +1357,7 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
1350 NEIGH_PRINTK1("neigh_parms_release: not found\n"); 1357 NEIGH_PRINTK1("neigh_parms_release: not found\n");
1351} 1358}
1352 1359
1353void neigh_parms_destroy(struct neigh_parms *parms) 1360static void neigh_parms_destroy(struct neigh_parms *parms)
1354{ 1361{
1355 release_net(parms->net); 1362 release_net(parms->net);
1356 kfree(parms); 1363 kfree(parms);