if (IS_ERR(lip))
                return PTR_ERR(lip);
 
+       tp->t_flags |= XFS_TRANS_DIRTY;
+       set_bit(XFS_LI_DIRTY, &lip->li_flags);
        dfp->dfp_intent = lip;
        return 1;
 }
 
 {
        struct xfs_attri_log_format     *attrp;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       set_bit(XFS_LI_DIRTY, &attrip->attri_item.li_flags);
-
        /*
         * At this point the xfs_attr_intent has been constructed, and we've
         * created the log intent. Fill in the attri log item and log format
 
        uint                            next_extent;
        struct xfs_map_extent           *map;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       set_bit(XFS_LI_DIRTY, &buip->bui_item.li_flags);
-
        /*
         * atomic_inc_return gives us the value after the increment;
         * we want to use it as an array index so we need to subtract 1 from
 
        uint                            next_extent;
        struct xfs_extent               *extp;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       set_bit(XFS_LI_DIRTY, &efip->efi_item.li_flags);
-
        /*
         * atomic_inc_return gives us the value after the increment;
         * we want to use it as an array index so we need to subtract 1 from
 
        uint                            next_extent;
        struct xfs_phys_extent          *pmap;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       set_bit(XFS_LI_DIRTY, &cuip->cui_item.li_flags);
-
        /*
         * atomic_inc_return gives us the value after the increment;
         * we want to use it as an array index so we need to subtract 1 from
 
        uint                            next_extent;
        struct xfs_map_extent           *map;
 
-       tp->t_flags |= XFS_TRANS_DIRTY;
-       set_bit(XFS_LI_DIRTY, &ruip->rui_item.li_flags);
-
        /*
         * atomic_inc_return gives us the value after the increment;
         * we want to use it as an array index so we need to subtract 1 from