struct xfs_mount *mp;
struct xfs_trans *trans;
struct xfs_trans_res tres;
+ unsigned int old_blk_res;
int error;
/*
mp = trans->t_mountp;
tres.tr_logres = trans->t_log_res;
tres.tr_logcount = trans->t_log_count;
+ old_blk_res = trans->t_blk_res;
/*
* Commit the current transaction.
tres.tr_logflags = XFS_TRANS_PERM_LOG_RES;
error = libxfs_trans_alloc(mp, &tres, 0, 0, 0, tpp);
trans = *tpp;
+ trans->t_blk_res = old_blk_res;
+
/*
* Ensure that the inode is in the new transaction and locked.
*/
exit(1);
}
ptr->t_mountp = mp;
+ ptr->t_blk_res = blocks;
INIT_LIST_HEAD(&ptr->t_items);
#ifdef XACT_DEBUG
fprintf(stderr, "allocated new transaction %p\n", ptr);
list_for_each_entry_safe(lidp, next, &tp->t_items, lid_trans) {
struct xfs_log_item *lip = lidp->lid_item;
- xfs_trans_del_item(lip);
+ xfs_trans_del_item(lip);
if (lip->li_type == XFS_LI_BUF)
buf_item_done((xfs_buf_log_item_t *)lip);