Whamcloud - gitweb
LU-1030 osc: new IO engine implementation
[fs/lustre-release.git] / lustre / obdclass / lu_ref.c
index 84afc67..3471bd3 100644 (file)
  * 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;