From db98d16c88021922cd5720e01c36aaa34e9fa92f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 13 Feb 2013 20:50:02 +0100 Subject: [PATCH] compat: backport of lock_map_acquire_read() This is a backport of: commit e159489baa717dbae70f9903770a6a4990865887 Author: Tejun Heo Date: Sun Jan 9 23:32:15 2011 +0100 workqueue: relax lockdep annotation on flush_work() Signed-off-by: Hauke Mehrtens --- include/linux/compat-2.6.38.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h index 8dfeed63773b..e936c42780e9 100644 --- a/include/linux/compat-2.6.38.h +++ b/include/linux/compat-2.6.38.h @@ -174,6 +174,24 @@ extern int __build_bug_on_failed; } while(0) #endif +/* Backport of: + * + * commit e159489baa717dbae70f9903770a6a4990865887 + * Author: Tejun Heo + * Date: Sun Jan 9 23:32:15 2011 +0100 + * + * workqueue: relax lockdep annotation on flush_work() + */ +#ifdef CONFIG_DEBUG_LOCK_ALLOC +# ifdef CONFIG_PROVE_LOCKING +# define lock_map_acquire_read(l) lock_acquire(l, 0, 0, 2, 2, NULL, _THIS_IP_) +# else +# define lock_map_acquire_read(l) lock_acquire(l, 0, 0, 2, 1, NULL, _THIS_IP_) +# endif +#else +# define lock_map_acquire_read(l) do { } while (0) +#endif + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) */ #endif /* LINUX_26_38_COMPAT_H */ -- 2.30.2