*/
ntp->t_mountp = tp->t_mountp;
INIT_LIST_HEAD(&ntp->t_items);
+ INIT_LIST_HEAD(&ntp->t_dfops);
ntp->t_firstblock = NULLFSBLOCK;
ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES);
ntp->t_blk_res = tp->t_blk_res - tp->t_blk_res_used;
tp->t_blk_res = tp->t_blk_res_used;
- /* copy the dfops pointer if it's external, otherwise move it */
- xfs_defer_init(ntp, &ntp->t_dfops_internal);
- if (tp->t_dfops != &tp->t_dfops_internal)
- ntp->t_dfops = tp->t_dfops;
- else
- xfs_defer_move(ntp, tp);
+ /* move deferred ops over to the new tp */
+ xfs_defer_move(ntp, tp);
return ntp;
}
(flags & XFS_TRANS_NOFS) ? KM_NOFS : KM_SLEEP);
tp->t_mountp = mp;
INIT_LIST_HEAD(&tp->t_items);
+ INIT_LIST_HEAD(&tp->t_dfops);
tp->t_firstblock = NULLFSBLOCK;
- xfs_defer_init(tp, &tp->t_dfops_internal);
-
error = xfs_trans_reserve(tp, resp, blocks, rtextents);
if (error) {
xfs_trans_cancel(tp);
* Finish deferred items on final commit. Only permanent transactions
* should ever have deferred ops.
*/
- WARN_ON_ONCE(!list_empty(&tp->t_dfops->dop_intake) &&
+ WARN_ON_ONCE(!list_empty(&tp->t_dfops) &&
!(tp->t_flags & XFS_TRANS_PERM_LOG_RES));
if (!regrant && (tp->t_flags & XFS_TRANS_PERM_LOG_RES)) {
error = xfs_defer_finish_noroll(&tp);