diff mbox

backports: add lockdep_rtnl_is_held() for < 3.13 without CONFIG_PROVE_LOCKING

Message ID 20170531083010.15135-1-luca@coelho.fi (mailing list archive)
State Accepted
Headers show

Commit Message

Luca Coelho May 31, 2017, 8:30 a.m. UTC
From: Luca Coelho <luciano.coelho@intel.com>

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>
---
 backport/backport-include/linux/rtnetlink.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Johannes Berg June 16, 2017, 1 p.m. UTC | #1
Both applied.

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
diff mbox

Patch

diff --git a/backport/backport-include/linux/rtnetlink.h b/backport/backport-include/linux/rtnetlink.h
index 9b68be820049..59beffa8316a 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 */