qti_lqes_resotre_init/fini should check that qti_lqes
has been inited before address qti_lqes_count.
Fix helps against following panic:
qti_lqes_restore_fini()) ASSERTION( qmt_info(env)->qti_lqes_rstr ) failed:
HPE-bug-id: LUS-10239
Change-Id: Ic93d87535f615fe419b2c3a2453506c515837031
Reviewed-on: https://es-gerrit.dev.cray.com/159116
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: Elena Gryaznova <c17455@cray.com>
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-on: https://review.whamcloud.com/45102
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
qti->qti_lqes_num * sizeof(struct lquota_entry *));
qti->qti_lqes_num = 0;
qti->qti_lqes_num * sizeof(struct lquota_entry *));
qti->qti_lqes_num = 0;
}
int qti_lqes_min_qunit(const struct lu_env *env)
}
int qti_lqes_min_qunit(const struct lu_env *env)
- if (qti_lqes_cnt(env) > QMT_MAX_POOL_NUM) {
+ if (qti_lqes_inited(env) && qti_lqes_cnt(env) > QMT_MAX_POOL_NUM) {
OBD_ALLOC(qmt_info(env)->qti_lqes_rstr,
qti_lqes_cnt(env) * sizeof(struct qmt_lqe_restore));
if (!qti_lqes_rstr(env))
OBD_ALLOC(qmt_info(env)->qti_lqes_rstr,
qti_lqes_cnt(env) * sizeof(struct qmt_lqe_restore));
if (!qti_lqes_rstr(env))
void qti_lqes_restore_fini(const struct lu_env *env)
{
void qti_lqes_restore_fini(const struct lu_env *env)
{
- if (qti_lqes_cnt(env) > QMT_MAX_POOL_NUM)
+ if (qti_lqes_inited(env) && qti_lqes_cnt(env) > QMT_MAX_POOL_NUM)
OBD_FREE(qmt_info(env)->qti_lqes_rstr,
qti_lqes_cnt(env) * sizeof(struct qmt_lqe_restore));
}
OBD_FREE(qmt_info(env)->qti_lqes_rstr,
qti_lqes_cnt(env) * sizeof(struct qmt_lqe_restore));
}
lqe_write_unlock(lqe);
out_nolock:
lqe_write_unlock(lqe);
out_nolock:
- qti_lqes_restore_fini(env);
- if (th != NULL && !IS_ERR(th))
- dt_trans_stop(env, qmt->qmt_child, th);
+ if (!is_updated) {
+ if (th != NULL && !IS_ERR(th))
+ dt_trans_stop(env, qmt->qmt_child, th);
+ qti_lqes_restore_fini(env);
+ }
if (rc == 0 && dirtied) {
qmt_glb_lock_notify(env, lqe, ver);
if (rc == 0 && dirtied) {
qmt_glb_lock_notify(env, lqe, ver);