aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
diff options
context:
space:
mode:
authorGravatar Peng Tao <bergwolf@gmail.com> 2013-06-06 22:59:11 +0800
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2013-06-06 11:31:02 -0700
commit4b5b4c7222b8eac2279e604e040561c855bbf0ce (patch)
treef4a18807d0fc30bc6c954a7bbc7df60b61da8d7e /drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
parentstaging/lustre: remove lu_context_keys_dump and lu_debugging_setup (diff)
downloadlinux-4b5b4c7222b8eac2279e604e040561c855bbf0ce.tar.gz
linux-4b5b4c7222b8eac2279e604e040561c855bbf0ce.tar.bz2
linux-4b5b4c7222b8eac2279e604e040561c855bbf0ce.zip
staging/lustre/libcfs: restore LINVRNT
It was mistakenly removed by coan. Add it back and also with a new Kconfig option to enable it. Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include/linux/libcfs/libcfs_private.h')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_private.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index c4f59075ed42..056caa467126 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -72,7 +72,16 @@ do { \
#define LASSERT(cond) LASSERTF(cond, "\n")
+#ifdef CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK
+/**
+ * This is for more expensive checks that one doesn't want to be enabled all
+ * the time. LINVRNT() has to be explicitly enabled by
+ * CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK option.
+ */
+# define LINVRNT(exp) LASSERT(exp)
+#else
# define LINVRNT(exp) ((void)sizeof!!(exp))
+#endif
#define KLASSERT(e) LASSERT(e)