summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2017-05-31 11:30:10 +0300
committerJohannes Berg <johannes.berg@intel.com>2017-06-16 14:59:41 +0200
commit1bfbd3c3571960fa2d935f5998fa1e450b1f9c05 (patch)
treefdafd5d707d3353ef3674c29ca0307080829224a
parent83e111d51e9c053c9c9af2d88189f5f868015929 (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>
-rw-r--r--backport/backport-include/linux/rtnetlink.h8
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 */