X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fobdclass%2Flu_ref.c;h=3471bd39bc643ea304cf96645a41c5dd42fdc97f;hb=9fe4b52ad2ffadf125d9b5c78bb2ff9a01725707;hp=84afc67412635da772b974c4fb0d8950d24c8ddb;hpb=921fa0f21c1722e127fd072089ee35ddb0135653;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/lu_ref.c b/lustre/obdclass/lu_ref.c index 84afc67..3471bd3 100644 --- a/lustre/obdclass/lu_ref.c +++ b/lustre/obdclass/lu_ref.c @@ -57,18 +57,17 @@ * 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;