summaryrefslogtreecommitdiffstats
path: root/net/core/dst.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-03-28 01:53:31 +0100
committerDavid S. Miller <davem@davemloft.net>2008-03-28 01:53:31 +0100
commit8d3308687f7f1eaa1bb5d202d14752d5f90068eb (patch)
treefa32a8ac2818950bbe7ab1e5f1e3a2ab4970b9b5 /net/core/dst.c
parent[NET]: uninline skb_push, de-bloats a lot (diff)
downloadlinux-8d3308687f7f1eaa1bb5d202d14752d5f90068eb.tar.xz
linux-8d3308687f7f1eaa1bb5d202d14752d5f90068eb.zip
[NET]: uninline dst_release
Codiff stats (allyesconfig, v2.6.24-mm1): -16420 187 funcs, 103 +, 16523 -, diff: -16420 --- dst_release Without number of debug related CONFIGs (v2.6.25-rc2-mm1): -7257 186 funcs, 70 +, 7327 -, diff: -7257 --- dst_release dst_release | +40 Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dst.c')
-rw-r--r--net/core/dst.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index 694cd2a3f6d2..fe03266130b6 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -259,6 +259,16 @@ again:
return NULL;
}
+void dst_release(struct dst_entry *dst)
+{
+ if (dst) {
+ WARN_ON(atomic_read(&dst->__refcnt) < 1);
+ smp_mb__before_atomic_dec();
+ atomic_dec(&dst->__refcnt);
+ }
+}
+EXPORT_SYMBOL(dst_release);
+
/* Dirty hack. We did it in 2.2 (in __dst_free),
* we have _very_ good reasons not to repeat
* this mistake in 2.3, but we have no choice