/*
  * Values for t_flags.
  */
-#define        XFS_TRANS_DIRTY         0x01    /* something needs to be logged */
-#define        XFS_TRANS_SB_DIRTY      0x02    /* superblock is modified */
-#define        XFS_TRANS_PERM_LOG_RES  0x04    /* xact took a permanent log res */
-#define        XFS_TRANS_SYNC          0x08    /* make commit synchronous */
-#define XFS_TRANS_RESERVE      0x20    /* OK to use reserved data blocks */
-#define XFS_TRANS_NO_WRITECOUNT 0x40   /* do not elevate SB writecount */
-#define XFS_TRANS_RES_FDBLKS   0x80    /* reserve newly freed blocks */
+/* Transaction needs to be logged */
+#define XFS_TRANS_DIRTY                        (1u << 0)
+/* Superblock is dirty and needs to be logged */
+#define XFS_TRANS_SB_DIRTY             (1u << 1)
+/* Transaction took a permanent log reservation */
+#define XFS_TRANS_PERM_LOG_RES         (1u << 2)
+/* Synchronous transaction commit needed */
+#define XFS_TRANS_SYNC                 (1u << 3)
+/* Transaction can use reserve block pool */
+#define XFS_TRANS_RESERVE              (1u << 4)
+/* Transaction should avoid VFS level superblock write accounting */
+#define XFS_TRANS_NO_WRITECOUNT                (1u << 5)
+/* Transaction has freed blocks returned to it's reservation */
+#define XFS_TRANS_RES_FDBLKS           (1u << 6)
+/* Transaction contains an intent done log item */
+#define XFS_TRANS_HAS_INTENT_DONE      (1u << 7)
+
 /*
  * LOWMODE is used by the allocator to activate the lowspace algorithm - when
  * free space is running low the extent allocator may choose to allocate an
 
         * 1.) releases the BUI and frees the BUD
         * 2.) shuts down the filesystem
         */
-       tp->t_flags |= XFS_TRANS_DIRTY;
+       tp->t_flags |= XFS_TRANS_DIRTY | XFS_TRANS_HAS_INTENT_DONE;
        set_bit(XFS_LI_DIRTY, &budp->bud_item.li_flags);
 
        return error;
 
         * 1.) releases the EFI and frees the EFD
         * 2.) shuts down the filesystem
         */
-       tp->t_flags |= XFS_TRANS_DIRTY;
+       tp->t_flags |= XFS_TRANS_DIRTY | XFS_TRANS_HAS_INTENT_DONE;
        set_bit(XFS_LI_DIRTY, &efdp->efd_item.li_flags);
 
        next_extent = efdp->efd_next_extent;
 
         * 1.) releases the CUI and frees the CUD
         * 2.) shuts down the filesystem
         */
-       tp->t_flags |= XFS_TRANS_DIRTY;
+       tp->t_flags |= XFS_TRANS_DIRTY | XFS_TRANS_HAS_INTENT_DONE;
        set_bit(XFS_LI_DIRTY, &cudp->cud_item.li_flags);
 
        return error;
 
         * 1.) releases the RUI and frees the RUD
         * 2.) shuts down the filesystem
         */
-       tp->t_flags |= XFS_TRANS_DIRTY;
+       tp->t_flags |= XFS_TRANS_DIRTY | XFS_TRANS_HAS_INTENT_DONE;
        set_bit(XFS_LI_DIRTY, &rudp->rud_item.li_flags);
 
        return error;