diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-11-07 18:11:56 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-11-07 18:11:56 -0800 |
commit | 0f1cd81d4a50ca99fb0b5cd8f68584bc5acab081 (patch) | |
tree | f0aa64e956d1d2addb2263ddcd238e9f014b36a0 /include/net/inet_sock.h | |
parent | 4e974c120039e35b90d2cb0459452bd9a6a71594 (diff) | |
parent | 39dae59d66acd86d1de24294bd2f343fd5e7a625 (diff) |
Merge tag 'v4.14-rc8' into next
Merge with mainline to bring in SPDX markings to avoid annoying merge
problems when some header files get deleted.
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r-- | include/net/inet_sock.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 425752f768d2..db8162dd8c0b 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -132,6 +132,12 @@ static inline int inet_request_bound_dev_if(const struct sock *sk, return sk->sk_bound_dev_if; } +static inline struct ip_options_rcu *ireq_opt_deref(const struct inet_request_sock *ireq) +{ + return rcu_dereference_check(ireq->ireq_opt, + refcount_read(&ireq->req.rsk_refcnt) > 0); +} + struct inet_cork { unsigned int flags; __be32 addr; |