#define print_dquot(...)
#endif
-static void write_dquots(dict_t *dict, struct quota_handle *qh)
+static int write_dquots(dict_t *dict, struct quota_handle *qh)
{
dnode_t *n;
struct dquot *dq;
+ int retval = 0;
for (n = dict_first(dict); n; n = dict_next(dict, n)) {
dq = dnode_get(n);
print_dquot("write", dq);
dq->dq_h = qh;
update_grace_times(dq);
- if (qh->qh_ops->commit_dquot(dq))
+ if (qh->qh_ops->commit_dquot(dq)) {
+ retval = -1;
break;
+ }
}
}
+ return retval;
}
errcode_t quota_write_inode(struct f2fs_sb_info *sbi, enum quota_type qtype)
if (retval) {
log_debug("Cannot initialize io on quotafile");
} else {
- write_dquots(dict, h);
+ retval = write_dquots(dict, h);
quota_file_close(sbi, h, 1);
}
}