trace_xfs_defer_relog_intent((*tpp)->t_mountp, dfp);
                XFS_STATS_INC((*tpp)->t_mountp, defer_relog);
-               dfp->dfp_intent = xfs_trans_item_relog(dfp->dfp_intent, *tpp);
+
+               xfs_defer_create_done(*tpp, dfp);
+               dfp->dfp_intent = xfs_trans_item_relog(dfp->dfp_intent,
+                               dfp->dfp_done, *tpp);
+               dfp->dfp_done = NULL;
        }
 
        if ((*tpp)->t_flags & XFS_TRANS_DIRTY)
 
 static struct xfs_log_item *
 xfs_attri_item_relog(
        struct xfs_log_item             *intent,
+       struct xfs_log_item             *done_item,
        struct xfs_trans                *tp)
 {
-       struct xfs_attrd_log_item       *attrdp;
        struct xfs_attri_log_item       *old_attrip;
        struct xfs_attri_log_item       *new_attrip;
        struct xfs_attri_log_format     *new_attrp;
        old_attrip = ATTRI_ITEM(intent);
        old_attrp = &old_attrip->attri_format;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       attrdp = xfs_trans_get_attrd(tp, old_attrip);
-       set_bit(XFS_LI_DIRTY, &attrdp->attrd_item.li_flags);
-
        /*
         * Create a new log item that shares the same name/value buffer as the
         * old log item.
 
 static struct xfs_log_item *
 xfs_bui_item_relog(
        struct xfs_log_item             *intent,
+       struct xfs_log_item             *done_item,
        struct xfs_trans                *tp)
 {
-       struct xfs_bud_log_item         *budp;
        struct xfs_bui_log_item         *buip;
        struct xfs_map_extent           *map;
        unsigned int                    count;
        count = BUI_ITEM(intent)->bui_format.bui_nextents;
        map = BUI_ITEM(intent)->bui_format.bui_extents;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       budp = xfs_trans_get_bud(tp, BUI_ITEM(intent));
-       set_bit(XFS_LI_DIRTY, &budp->bud_item.li_flags);
-
        buip = xfs_bui_init(tp->t_mountp);
        memcpy(buip->bui_format.bui_extents, map, count * sizeof(*map));
        atomic_set(&buip->bui_next_extent, count);
 
 static struct xfs_log_item *
 xfs_efi_item_relog(
        struct xfs_log_item             *intent,
+       struct xfs_log_item             *done_item,
        struct xfs_trans                *tp)
 {
-       struct xfs_efd_log_item         *efdp;
+       struct xfs_efd_log_item         *efdp = EFD_ITEM(done_item);
        struct xfs_efi_log_item         *efip;
        struct xfs_extent               *extp;
        unsigned int                    count;
        count = EFI_ITEM(intent)->efi_format.efi_nextents;
        extp = EFI_ITEM(intent)->efi_format.efi_extents;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       efdp = xfs_trans_get_efd(tp, EFI_ITEM(intent), count);
        efdp->efd_next_extent = count;
        memcpy(efdp->efd_format.efd_extents, extp, count * sizeof(*extp));
-       set_bit(XFS_LI_DIRTY, &efdp->efd_item.li_flags);
 
        efip = xfs_efi_init(tp->t_mountp, count);
        memcpy(efip->efi_format.efi_extents, extp, count * sizeof(*extp));
 
 static struct xfs_log_item *
 xfs_cui_item_relog(
        struct xfs_log_item             *intent,
+       struct xfs_log_item             *done_item,
        struct xfs_trans                *tp)
 {
-       struct xfs_cud_log_item         *cudp;
        struct xfs_cui_log_item         *cuip;
        struct xfs_phys_extent          *pmap;
        unsigned int                    count;
        count = CUI_ITEM(intent)->cui_format.cui_nextents;
        pmap = CUI_ITEM(intent)->cui_format.cui_extents;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       cudp = xfs_trans_get_cud(tp, CUI_ITEM(intent));
-       set_bit(XFS_LI_DIRTY, &cudp->cud_item.li_flags);
-
        cuip = xfs_cui_init(tp->t_mountp, count);
        memcpy(cuip->cui_format.cui_extents, pmap, count * sizeof(*pmap));
        atomic_set(&cuip->cui_next_extent, count);
 
 static struct xfs_log_item *
 xfs_rui_item_relog(
        struct xfs_log_item             *intent,
+       struct xfs_log_item             *done_item,
        struct xfs_trans                *tp)
 {
-       struct xfs_rud_log_item         *rudp;
        struct xfs_rui_log_item         *ruip;
        struct xfs_map_extent           *map;
        unsigned int                    count;
        count = RUI_ITEM(intent)->rui_format.rui_nextents;
        map = RUI_ITEM(intent)->rui_format.rui_extents;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       rudp = xfs_trans_get_rud(tp, RUI_ITEM(intent));
-       set_bit(XFS_LI_DIRTY, &rudp->rud_item.li_flags);
-
        ruip = xfs_rui_init(tp->t_mountp, count);
        memcpy(ruip->rui_format.rui_extents, map, count * sizeof(*map));
        atomic_set(&ruip->rui_next_extent, count);
 
        void (*iop_release)(struct xfs_log_item *);
        bool (*iop_match)(struct xfs_log_item *item, uint64_t id);
        struct xfs_log_item *(*iop_relog)(struct xfs_log_item *intent,
+                       struct xfs_log_item *done_item,
                        struct xfs_trans *tp);
        struct xfs_log_item *(*iop_intent)(struct xfs_log_item *intent_done);
 };
 static inline struct xfs_log_item *
 xfs_trans_item_relog(
        struct xfs_log_item     *lip,
+       struct xfs_log_item     *done_lip,
        struct xfs_trans        *tp)
 {
-       return lip->li_ops->iop_relog(lip, tp);
+       return lip->li_ops->iop_relog(lip, done_lip, tp);
 }
 
 struct xfs_dquot;