diff mbox

[2/2] compat: backport rtnl_dereference

Message ID 1305569419-87899-2-git-send-email-nbd@openwrt.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Felix Fietkau May 16, 2011, 6:10 p.m. UTC
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 include/linux/compat-2.6.37.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/include/linux/compat-2.6.37.h b/include/linux/compat-2.6.37.h
index 57868f5..a83c9c7 100644
--- a/include/linux/compat-2.6.37.h
+++ b/include/linux/compat-2.6.37.h
@@ -112,6 +112,9 @@  extern void compat_led_brightness_set(struct led_classdev *led_cdev,
 
 extern void *vzalloc(unsigned long size);
 
+#define rtnl_dereference(p)                                     \
+        rcu_dereference_protected(p, lockdep_rtnl_is_held())
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) */
 
 #endif /* LINUX_26_37_COMPAT_H */