- /* do object accounting */
- osd_zfs_acct_uid(env, osd, obj->oo_attr.la_uid, -1, oh);
- osd_zfs_acct_gid(env, osd, obj->oo_attr.la_gid, -1, oh);
+ /* Remove object from inode accounting. It is not fatal for the destroy
+ * operation if something goes wrong while updating accounting, but we
+ * still log an error message to notify the administrator */
+ rc = -zap_increment_int(osd->od_objset.os, osd->od_iusr_oid,
+ obj->oo_attr.la_uid, -1, oh->ot_tx);
+ if (rc)
+ CERROR("%s: failed to remove "DFID" from accounting ZAP for usr"
+ " %d: rc = %d\n", osd->od_svname, PFID(fid),
+ obj->oo_attr.la_uid, rc);
+ rc = -zap_increment_int(osd->od_objset.os, osd->od_igrp_oid,
+ obj->oo_attr.la_gid, -1, oh->ot_tx);
+ if (rc)
+ CERROR("%s: failed to remove "DFID" from accounting ZAP for grp"
+ " %d: rc = %d\n", osd->od_svname, PFID(fid),
+ obj->oo_attr.la_gid, rc);