aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
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)
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);