diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2017-05-31 11:30:10 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-06-16 14:59:41 +0200 |
commit | 1bfbd3c3571960fa2d935f5998fa1e450b1f9c05 (patch) | |
tree | fdafd5d707d3353ef3674c29ca0307080829224a /backport | |
parent | 83e111d51e9c053c9c9af2d88189f5f868015929 (diff) |
backports: add lockdep_rtnl_is_held() for < 3.13 without CONFIG_PROVE_LOCKING
In kernels earlier than 3.13, lockdep_rtnl_is_held() is only declared
in rtnetlink.h when CONFIG_PROVE_LOCKING is not set. Backport this
function if that's the case.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/backport-include/linux/rtnetlink.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backport/backport-include/linux/rtnetlink.h b/backport/backport-include/linux/rtnetlink.h index 9b68be82..59beffa8 100644 --- a/backport/backport-include/linux/rtnetlink.h +++ b/backport/backport-include/linux/rtnetlink.h @@ -18,4 +18,12 @@ ndo_dflt_fdb_add(ndm, tb, dev, addr, flags) #endif +#if LINUX_VERSION_IS_LESS(3,13,0) && \ + !defined(CONFIG_PROVE_LOCKING) +static inline bool lockdep_rtnl_is_held(void) +{ + return true; +} +#endif + #endif /* __BACKPORT_LINUX_RTNETLINK_H */ |