From: Maxim Patlasov Date: Mon, 22 Feb 2010 22:20:54 +0000 (-0800) Subject: b=21853 define cfs_*_nested for CONFIG_DEBUG_LOCK_ALLOC=y X-Git-Tag: 1.10.0.38~26 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=08a58efb510c9e9bdd62ba20e3e6d9470b5144ad 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 --- 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 */