- /* do both accounting updates outside oo_attr_lock below */
- if ((valid & LA_UID) && (la->la_uid != obj->oo_attr.la_uid)) {
- /* Update user accounting. Failure isn't fatal, but we still
- * log an error message */
- rc = -zap_increment_int(osd->od_os, osd->od_iusr_oid,
- la->la_uid, 1, oh->ot_tx);
- if (rc)
- CERROR("%s: failed to update accounting ZAP for user "
- "%d (%d)\n", osd->od_svname, la->la_uid, rc);
- rc = -zap_increment_int(osd->od_os, osd->od_iusr_oid,
- obj->oo_attr.la_uid, -1, oh->ot_tx);
- if (rc)
- CERROR("%s: failed to update accounting ZAP for user "
- "%d (%d)\n", osd->od_svname,
- obj->oo_attr.la_uid, rc);
- }
- if ((valid & LA_GID) && (la->la_gid != obj->oo_attr.la_gid)) {
- /* Update group accounting. Failure isn't fatal, but we still
- * log an error message */
- rc = -zap_increment_int(osd->od_os, osd->od_igrp_oid,
- la->la_gid, 1, oh->ot_tx);
- if (rc)
- CERROR("%s: failed to update accounting ZAP for user "
- "%d (%d)\n", osd->od_svname, la->la_gid, rc);
- rc = -zap_increment_int(osd->od_os, osd->od_igrp_oid,
- obj->oo_attr.la_gid, -1, oh->ot_tx);
- if (rc)
- CERROR("%s: failed to update accounting ZAP for user "
- "%d (%d)\n", osd->od_svname,
- obj->oo_attr.la_gid, rc);
- }
-