Commit 8d330868 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

[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: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c2aa270a
...@@ -163,15 +163,7 @@ struct dst_entry * dst_clone(struct dst_entry * dst) ...@@ -163,15 +163,7 @@ struct dst_entry * dst_clone(struct dst_entry * dst)
return dst; return dst;
} }
static inline extern void dst_release(struct dst_entry *dst);
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);
}
}
/* Children define the path of the packet through the /* Children define the path of the packet through the
* Linux networking. Thus, destinations are stackable. * Linux networking. Thus, destinations are stackable.
......
...@@ -259,6 +259,16 @@ struct dst_entry *dst_destroy(struct dst_entry * dst) ...@@ -259,6 +259,16 @@ struct dst_entry *dst_destroy(struct dst_entry * dst)
return NULL; 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), /* Dirty hack. We did it in 2.2 (in __dst_free),
* we have _very_ good reasons not to repeat * we have _very_ good reasons not to repeat
* this mistake in 2.3, but we have no choice * this mistake in 2.3, but we have no choice
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment