aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2011-07-08 08:39:41 -0400
committerJiri Kosina <jkosina@suse.cz>2011-07-08 16:21:58 -0400
commitd8bf4ca9ca9576548628344c9725edd3786e90b1 (patch)
treedf338f50a5af6bc3651bd863b79fa91e6b1e9e20 /include/net
parenteb032b9837a958e21ca000358a5bde5e17192ddb (diff)
rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
Since ca5ecddf (rcu: define __rcu address space modifier for sparse) rcu_dereference_check use rcu_read_lock_held as a part of condition automatically so callers do not have to do that as well. Signed-off-by: Michal Hocko <mhocko@suse.cz> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sock.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index c0b938cb4b1a..d5b65c19a8e3 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1301,8 +1301,7 @@ extern unsigned long sock_i_ino(struct sock *sk);
1301static inline struct dst_entry * 1301static inline struct dst_entry *
1302__sk_dst_get(struct sock *sk) 1302__sk_dst_get(struct sock *sk)
1303{ 1303{
1304 return rcu_dereference_check(sk->sk_dst_cache, rcu_read_lock_held() || 1304 return rcu_dereference_check(sk->sk_dst_cache, sock_owned_by_user(sk) ||
1305 sock_owned_by_user(sk) ||
1306 lockdep_is_held(&sk->sk_lock.slock)); 1305 lockdep_is_held(&sk->sk_lock.slock));
1307} 1306}
1308 1307