__u64 ver;
bool dirtied = false;
int rc = 0;
- int need_id_notify = 0;
+ bool need_id_notify = false;
ENTRY;
/* need to write back to global quota file? */
quota_set:
/* recompute qunit in case it was never initialized */
if (qmt_revalidate(env, lqe))
- need_id_notify = 1;
+ need_id_notify = true;
/* clear grace time */
if (lqe->lqe_softlimit == 0 ||
/* compute new qunit value now that we have modified the quota
* settings or clear/set edquot flag if needed */
- if (qmt_adjust_qunit(env, lqe) || qmt_adjust_edquot(lqe, now))
- need_id_notify |= 1;
+ need_id_notify |= qmt_adjust_qunit(env, lqe);
+ need_id_notify |= qmt_adjust_edquot(lqe, now);
}
EXIT;
out:
LQUOTA_DEBUG(lqe, "notify all lqe with default quota");
iter_data.qeid_env = env;
iter_data.qeid_qmt = qmt;
- cfs_hash_for_each_safe(lqe->lqe_site->lqs_hash,
+ cfs_hash_for_each(lqe->lqe_site->lqs_hash,
qmt_entry_iter_cb, &iter_data);
/* Always notify slaves with default values. Don't
* care about overhead as will be sent only not changed
* values(see qmt_id_lock_cb for details).*/
- need_id_notify = 1;
+ need_id_notify = true;
}
- if (need_id_notify && !is_updated)
+ if (need_id_notify)
qmt_set_id_notify(env, qmt, lqe);
}
break;
case LUSTRE_Q_GETDEFAULT:
+ case LUSTRE_Q_GETDEFAULT_POOL:
is_default = true;
/* fallthrough */
break;
case LUSTRE_Q_SETDEFAULT:
+ case LUSTRE_Q_SETDEFAULT_POOL:
is_default = true;
/* fallthrough */