]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/rtnetlink.h
[RTNETLINK]: Fix bogus ASSERT_RTNL warning
[linux-2.6-omap-h63xx.git] / include / linux / rtnetlink.h
index b9e174079002300dee538600e8e6e5585757aed8..44c81c74453816b77208edb22c8d1507f83720f0 100644 (file)
@@ -740,13 +740,13 @@ extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change);
 extern void rtnl_lock(void);
 extern void rtnl_unlock(void);
 extern int rtnl_trylock(void);
+extern int rtnl_is_locked(void);
 
 extern void rtnetlink_init(void);
 extern void __rtnl_unlock(void);
 
 #define ASSERT_RTNL() do { \
-       if (unlikely(rtnl_trylock())) { \
-               rtnl_unlock(); \
+       if (unlikely(!rtnl_is_locked())) { \
                printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \
                       __FILE__,  __LINE__); \
                dump_stack(); \