Skip to content
Snippets Groups Projects
Commit 86b66283 authored by Andreas Dilger's avatar Andreas Dilger
Browse files

Branch HEAD

The infiniband code includes its own lockdep compatibility code and this
#defines lockdep_set_class but doesn't include mutex_lock_nested() or
down_write_nested(), causing a compiler error in obdclass/llog_cat.c.

mutex_{un,}lock_nested() and down_{read,write}_nested() are functions
under CONFIG_DEBUG_LOCK_ALLOC, but #defined to regular locks without
CONFIG_DEBUG_LOCK_ALLOC so just checking #ifndef isn't sufficient.
b=16450
parent ecd4ceb2
No related branches found
No related tags found
No related merge requests found
...@@ -160,9 +160,11 @@ struct lock_class_key { ...@@ -160,9 +160,11 @@ struct lock_class_key {
# define lockdep_set_class(lock, key) \ # define lockdep_set_class(lock, key) \
do { (void)sizeof (lock);(void)sizeof (key); } while (0) do { (void)sizeof (lock);(void)sizeof (key); } while (0)
/* This has to be a macro, so that `subclass' can be undefined in kernels that /* This has to be a macro, so that `subclass' can be undefined in kernels that
* do not support lockdep. */ * do not support lockdep. */
#endif /* lockdep_set_class */
#ifndef CONFIG_DEBUG_LOCK_ALLOC
#ifndef mutex_lock_nested #ifndef mutex_lock_nested
# define mutex_lock_nested(mutex, subclass) mutex_lock(mutex) # define mutex_lock_nested(mutex, subclass) mutex_lock(mutex)
#endif #endif
...@@ -178,7 +180,7 @@ struct lock_class_key { ...@@ -178,7 +180,7 @@ struct lock_class_key {
#ifndef down_write_nested #ifndef down_write_nested
# define down_write_nested(lock, subclass) down_write(lock) # define down_write_nested(lock, subclass) down_write(lock)
#endif #endif
#endif /* CONFIG_DEBUG_LOCK_ALLOC */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) */
#endif /* __LIBCFS_LINUX_CFS_LOCK_H__ */ #endif /* __LIBCFS_LINUX_CFS_LOCK_H__ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment