[RFC PATCH 5/8] [NET]: uninline dst_release

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ilpo Järvinen
Date: Wednesday, February 20, 2008 - 6:47 am

Codiff stats:
-16420  187 funcs, 103 +, 16523 -, diff: -16420 --- dst_release

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
 include/net/dst.h |   10 +---------
 net/core/dst.c    |   10 ++++++++++
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/include/net/dst.h b/include/net/dst.h
index e3ac7d0..bf33471 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -158,15 +158,7 @@ struct dst_entry * dst_clone(struct dst_entry * dst)
 	return dst;
 }
 
-static inline
-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);
-	}
-}
+extern void dst_release(struct dst_entry *dst);
 
 /* Children define the path of the packet through the
  * Linux networking.  Thus, destinations are stackable.
diff --git a/net/core/dst.c b/net/core/dst.c
index 7deef48..cc2e724 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
-- 
1.5.2.2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 0/8]: uninline &amp; uninline, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 1/8] [NET]: uninline skb_put, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 2/8] [NET]: uninline skb_pull, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 4/8] [NET]: uninline skb_push, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 5/8] [NET]: uninline dst_release, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 6/8] [NET]: uninline skb_trim, de-bloats, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
Re: [RFC PATCH 1/8] [NET]: uninline skb_put, de-bloats a lot, Patrick McHardy, (Wed Feb 20, 6:54 am)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Vlad Yasevich, (Wed Feb 20, 3:16 pm)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Ilpo Järvinen, (Wed Feb 20, 3:34 pm)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Vlad Yasevich, (Thu Feb 21, 8:27 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andrew Morton, (Sat Feb 23, 1:02 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Ilpo Järvinen, (Sat Feb 23, 3:11 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andi Kleen, (Sat Feb 23, 6:15 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Ilpo Järvinen, (Sat Feb 23, 11:06 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andrew Morton, (Sat Feb 23, 11:55 am)
RE: [RFC PATCH 0/8]: uninline &amp; uninline, Hua Zhong, (Sat Feb 23, 12:58 pm)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andi Kleen, (Sat Feb 23, 2:02 pm)