Subject: [PATCH] net: dst_release() cleanup

From: Eric Dumazet <[email-masked]>
Date: Sat, 05 Dec 2009 13:02:13 +0100

atomic_dec_return() is a full memory barrier, we can omit
the smp_mb__before_atomic_dec() call.

Signed-off-by: Eric Dumazet <[email-masked]>
---
 net/core/dst.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/net/core/dst.c b/net/core/dst.c
index 57bc4d5..cdec1d1 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -262,13 +262,8 @@ again:
 
 void dst_release(struct dst_entry *dst)
 {
-	if (dst) {
-               int newrefcnt;
-
-		smp_mb__before_atomic_dec();
-               newrefcnt = atomic_dec_return(&dst->__refcnt);
-               WARN_ON(newrefcnt < 0);
-	}
+	if (dst)
+		WARN_ON(atomic_dec_return(&dst->__refcnt) < 0);
 }
 EXPORT_SYMBOL(dst_release);