struct ptlrpc_sec *sec = ctx->cc_sec;
LASSERT(sec);
- LASSERT_ATOMIC_POS(&ctx->cc_refcount);
+ LASSERT(atomic_read(&(ctx)->cc_refcount) > 0);
if (!atomic_dec_and_test(&ctx->cc_refcount))
return;
static void sptlrpc_sec_kill(struct ptlrpc_sec *sec)
{
- LASSERT_ATOMIC_POS(&sec->ps_refcount);
+ LASSERT(atomic_read(&(sec)->ps_refcount) > 0);
if (sec->ps_policy->sp_cops->kill_sec) {
sec->ps_policy->sp_cops->kill_sec(sec);
void sptlrpc_sec_put(struct ptlrpc_sec *sec)
{
if (sec) {
- LASSERT_ATOMIC_POS(&sec->ps_refcount);
+ LASSERT(atomic_read(&(sec)->ps_refcount) > 0);
if (atomic_dec_and_test(&sec->ps_refcount)) {
sptlrpc_gc_del_sec(sec);
{
struct ptlrpc_sec *old_sec;
- LASSERT_ATOMIC_POS(&sec->ps_refcount);
+ LASSERT(atomic_read(&(sec)->ps_refcount) > 0);
write_lock(&imp->imp_sec_lock);
old_sec = imp->imp_sec;
LASSERT(ctx->cc_sec);
LASSERT(ctx->cc_sec->ps_policy);
LASSERT(req->rq_reqmsg == NULL);
- LASSERT_ATOMIC_POS(&ctx->cc_refcount);
+ LASSERT(atomic_read(&(ctx)->cc_refcount) > 0);
policy = ctx->cc_sec->ps_policy;
rc = policy->sp_cops->alloc_reqbuf(ctx->cc_sec, req, msgsize);
LASSERT(ctx);
LASSERT(ctx->cc_sec);
LASSERT(ctx->cc_sec->ps_policy);
- LASSERT_ATOMIC_POS(&ctx->cc_refcount);
+ LASSERT(atomic_read(&(ctx)->cc_refcount) > 0);
if (req->rq_reqbuf == NULL && req->rq_clrbuf == NULL)
return;
LASSERT(ctx);
LASSERT(ctx->cc_sec);
LASSERT(ctx->cc_sec->ps_policy);
- LASSERT_ATOMIC_POS(&ctx->cc_refcount);
+ LASSERT(atomic_read(&(ctx)->cc_refcount) > 0);
if (req->rq_repbuf == NULL)
return;
if (ctx == NULL)
return;
- LASSERT_ATOMIC_POS(&ctx->sc_refcount);
+ LASSERT(atomic_read(&(ctx)->sc_refcount) > 0);
if (atomic_dec_and_test(&ctx->sc_refcount)) {
if (ctx->sc_policy->sp_sops->free_ctx)
ctx->sc_policy->sp_sops->free_ctx(ctx);
if (ctx == NULL)
return;
- LASSERT_ATOMIC_POS(&ctx->sc_refcount);
+ LASSERT(atomic_read(&(ctx)->sc_refcount) > 0);
if (ctx->sc_policy->sp_sops->invalidate_ctx)
ctx->sc_policy->sp_sops->invalidate_ctx(ctx);
}