]> err.no Git - linux-2.6/commitdiff
[ARP]: neigh_parms_put(destroy) are essentially local to core/neighbour.c.
authorDenis V. Lunev <den@openvz.org>
Thu, 24 Jan 2008 08:30:58 +0000 (00:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:02:11 +0000 (15:02 -0800)
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>
include/net/neighbour.h
net/core/neighbour.c

index a0d42a54cfb282a0ff72e20ca450d57ef3d6f8ec..ebbfb509822e068a992c49ef7b2de6c5f92a617f 100644 (file)
@@ -213,7 +213,6 @@ extern struct neighbour     *neigh_event_ns(struct neigh_table *tbl,
 
 extern struct neigh_parms      *neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl);
 extern void                    neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms);
-extern void                    neigh_parms_destroy(struct neigh_parms *parms);
 extern unsigned long           neigh_rand_reach_time(unsigned long base);
 
 extern 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)
        atomic_dec(&parms->refcnt);
 }
 
-static inline void neigh_parms_put(struct neigh_parms *parms)
-{
-       if (atomic_dec_and_test(&parms->refcnt))
-               neigh_parms_destroy(parms);
-}
-
 static inline struct neigh_parms *neigh_parms_clone(struct neigh_parms *parms)
 {
        atomic_inc(&parms->refcnt);
index a8be5ef133371b16568bf40cc5eb02c911d315cd..a16cf1ec5e5ebe9fc100cb027c740c9387184472 100644 (file)
@@ -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);