Subject: [PATCH net-next] ipv6: remove useless spin_lock/spin_unlock

From: Duan Jiong <[email-masked]>
Date: Wed, 3 Dec 2014 09:32:34 +0800

xchg is atomic, so there is no necessary to use spin_lock/spin_unlock
to protect it.

Signed-off-by: Duan Jiong <[email-masked]>
---
 net/ipv6/ipv6_sockglue.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index e1a9583..92ca907 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -112,9 +112,7 @@ struct ipv6_txoptions *ipv6_update_options(struct sock *sk,
 		}
 		opt = xchg(&inet6_sk(sk)->opt, opt);
 	} else {
-		spin_lock(&sk->sk_dst_lock);
 		opt = xchg(&inet6_sk(sk)->opt, opt);
-		spin_unlock(&sk->sk_dst_lock);
 	}
 	sk_dst_reset(sk);
 
-- 
1.8.3.1