From 08a58efb510c9e9bdd62ba20e3e6d9470b5144ad Mon Sep 17 00:00:00 2001 From: Maxim Patlasov Date: Mon, 22 Feb 2010 14:20:54 -0800 Subject: [PATCH] b=21853 define cfs_*_nested for CONFIG_DEBUG_LOCK_ALLOC=y Post-nn fix: define cfs_mutex_lock_nested and other libcfs nested lock prims as linux native nested prims when CONFIG_DEBUG_LOCK_ALLOC is defined. i=rread i=alex --- libcfs/include/libcfs/linux/linux-lock.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libcfs/include/libcfs/linux/linux-lock.h b/libcfs/include/libcfs/linux/linux-lock.h index 789718e..18dbfc8 100644 --- a/libcfs/include/libcfs/linux/linux-lock.h +++ b/libcfs/include/libcfs/linux/linux-lock.h @@ -320,6 +320,12 @@ typedef struct lock_class_key cfs_lock_class_key_t; #else #define cfs_down_write_nested(lock, subclass) down_write_nested(lock, subclass) #endif +#else /* CONFIG_DEBUG_LOCK_ALLOC is defined */ +#define cfs_mutex_lock_nested(mutex, subclass) \ + mutex_lock_nested(mutex, subclass) +#define cfs_spin_lock_nested(lock, subclass) spin_lock_nested(lock, subclass) +#define cfs_down_read_nested(lock, subclass) down_read_nested(lock, subclass) +#define cfs_down_write_nested(lock, subclass) down_write_nested(lock, subclass) #endif /* CONFIG_DEBUG_LOCK_ALLOC */ -- 1.8.3.1