When callback of TBF timer is triggered, nrs_lock could be
held by the current CPU which will cause dead lock. This
patch removes unnecessary nrs_lock to fix this problem.
Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I6329e3e71da30a415dbb35b37d79ade118917c6a
Reviewed-on: http://review.whamcloud.com/12228
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
struct ptlrpc_nrs *nrs = head->th_res.res_policy->pol_nrs;
struct ptlrpc_service_part *svcpt = nrs->nrs_svcpt;
- spin_lock(&nrs->nrs_lock);
nrs->nrs_throttling = 0;
- spin_unlock(&nrs->nrs_lock);
wake_up(&svcpt->scp_waitq);
return HRTIMER_NORESTART;
} else {
ktime_t time;
- spin_lock(&policy->pol_nrs->nrs_lock);
policy->pol_nrs->nrs_throttling = 1;
- spin_unlock(&policy->pol_nrs->nrs_lock);
head->th_deadline = deadline;
time = ktime_set(0, 0);
time = ktime_add_ns(time, deadline);