]> git.openfabrics.org - ~emulex/for-vlad/old/compat.git/commitdiff
compat: add dummy lockdep_rtnl_is_held implementation
authorJohn W. Linville <linville@tuxdriver.com>
Wed, 15 Feb 2012 21:36:25 +0000 (16:36 -0500)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Thu, 16 Feb 2012 19:53:12 +0000 (11:53 -0800)
Obviously, this is wrong.  But the base kernel will have rtnl_mutex
declared static, with no way to access it.  I think this is the best
we can do...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
include/linux/compat-2.6.34.h

index a9c9dd11679abe992a508763100146b912f691f2..da242ce05367f713964f999cdde563c9ce2d3ac5 100644 (file)
@@ -292,6 +292,18 @@ static inline int rcu_read_lock_held(void)
        return 1;
 }
 
+#ifdef CONFIG_PROVE_LOCKING
+/*
+ * Obviously, this is wrong.  But the base kernel will have rtnl_mutex
+ * declared static, with no way to access it.  I think this is the best
+ * we can do...
+ */
+static inline int lockdep_rtnl_is_held(void)
+{
+        return 1;
+}
+#endif /* #ifdef CONFIG_PROVE_LOCKING */
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)) */
 
 #endif /* LINUX_26_34_COMPAT_H */