-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*/
#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#ifdef __KERNEL__
# include <libcfs/libcfs.h>
* Asserts a condition for a given lu_ref. Must be called with
* lu_ref::lf_guard held.
*/
-#define REFASSERT(ref, expr) \
- do { \
- struct lu_ref *__ref = (ref); \
- \
- if (unlikely(!(expr))) { \
- lu_ref_print(__ref); \
- cfs_spin_unlock(&__ref->lf_guard); \
- lu_ref_print_all(); \
- LASSERT(0); \
- cfs_spin_lock(&__ref->lf_guard); \
- } \
- } while (0)
+#define REFASSERT(ref, expr) do { \
+ struct lu_ref *__tmp = (ref); \
+ \
+ if (unlikely(!(expr))) { \
+ lu_ref_print(__tmp); \
+ cfs_spin_unlock(&__tmp->lf_guard); \
+ lu_ref_print_all(); \
+ LASSERT(0); \
+ cfs_spin_lock(&__tmp->lf_guard); \
+ } \
+} while (0)
struct lu_ref_link {
struct lu_ref *ll_ref;
++iterations;
if (lu_ref_link_eq(link, scope, source)) {
if (iterations > lu_ref_chain_max_length) {
- CWARN("Long lu_ref chain %i \"%s\":%p\n",
+ CWARN("Long lu_ref chain %d \"%s\":%p\n",
iterations, scope, source);
lu_ref_chain_max_length = iterations * 3 / 2;
}