X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_lockd.c;h=558eee3babf29c41f99bf33fd59ba6b644c52151;hp=19e5c12bdfca2d1a4e7d1be36c13eaae4cc1d7cf;hb=5c3a69e52444f8ea17849df1f9de0465d1398224;hpb=91dbd0b99e4d3fb6fe6a870cbf7297b5a362f05f;ds=inline diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 19e5c12..558eee3 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -667,7 +667,6 @@ static int ldlm_cb_interpret(const struct lu_env *env, struct ldlm_cb_async_args *ca = data; struct ldlm_lock *lock = ca->ca_lock; struct ldlm_cb_set_arg *arg = ca->ca_set_arg; - int count; ENTRY; LASSERT(lock != NULL); @@ -680,11 +679,10 @@ static int ldlm_cb_interpret(const struct lu_env *env, } LDLM_LOCK_RELEASE(lock); - count = cfs_atomic_dec_return(&arg->rpcs); - if (count < arg->threshold) + if (cfs_atomic_dec_return(&arg->rpcs) < arg->threshold) cfs_waitq_signal(&arg->waitq); - if (count == 0) - ldlm_csa_put(arg); + + ldlm_csa_put(arg); RETURN(0); } @@ -703,8 +701,8 @@ static inline int ldlm_bl_and_cp_ast_tail(struct ptlrpc_request *req, cfs_atomic_inc(&arg->restart); } else { LDLM_LOCK_GET(lock); - if (cfs_atomic_inc_return(&arg->rpcs) == 1) - cfs_atomic_inc(&arg->refcount); + cfs_atomic_inc(&arg->rpcs); + cfs_atomic_inc(&arg->refcount); ptlrpcd_add_req(req, PDL_POLICY_ROUND, -1); }