diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-01-14 15:33:23 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-01-14 15:33:23 -0800 |
commit | 3eb66e91a25497065c5322b1268cbc3953642227 (patch) | |
tree | 69f8e1312323ceeafc1a0fdc24d168e1617ffed4 /include/net/llc.h | |
parent | 4add635b4e00dd7d6aad83a937afdf1957196da6 (diff) | |
parent | 8fe28cb58bcb235034b64cbbb7550a8a43fd88be (diff) |
Merge tag 'v4.20' into for-linus
Sync with mainline to get linux/overflow.h among other things.
Diffstat (limited to 'include/net/llc.h')
-rw-r--r-- | include/net/llc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/llc.h b/include/net/llc.h index dc35f25eb679..df282d9b4017 100644 --- a/include/net/llc.h +++ b/include/net/llc.h @@ -66,6 +66,7 @@ struct llc_sap { int sk_count; struct hlist_nulls_head sk_laddr_hash[LLC_SK_LADDR_HASH_ENTRIES]; struct hlist_head sk_dev_hash[LLC_SK_DEV_HASH_ENTRIES]; + struct rcu_head rcu; }; static inline @@ -116,6 +117,11 @@ static inline void llc_sap_hold(struct llc_sap *sap) refcount_inc(&sap->refcnt); } +static inline bool llc_sap_hold_safe(struct llc_sap *sap) +{ + return refcount_inc_not_zero(&sap->refcnt); +} + void llc_sap_close(struct llc_sap *sap); static inline void llc_sap_put(struct llc_sap *sap) |