From 1bfbd3c3571960fa2d935f5998fa1e450b1f9c05 Mon Sep 17 00:00:00 2001 From: Luca Coelho Date: Wed, 31 May 2017 11:30:10 +0300 Subject: 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 Signed-off-by: Johannes Berg --- backport/backport-include/linux/rtnetlink.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 */ -- cgit v1.2.3