]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: remove the t_magic field in struct xfs_trans
authorChristoph Hellwig <hch@lst.de>
Mon, 6 Jan 2025 09:50:31 +0000 (10:50 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 8 Jan 2025 13:46:55 +0000 (14:46 +0100)
The t_magic field is only ever assigned to, but never read.  Remove it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans.h

index f53f82456288e5dc7edf36cedb4ac7856550815c..c6657072361a479ee5abfe2d5b22dc5a0335193c 100644 (file)
@@ -100,7 +100,6 @@ xfs_trans_dup(
        /*
         * Initialize the new transaction structure.
         */
-       ntp->t_magic = XFS_TRANS_HEADER_MAGIC;
        ntp->t_mountp = tp->t_mountp;
        INIT_LIST_HEAD(&ntp->t_items);
        INIT_LIST_HEAD(&ntp->t_busy);
@@ -275,7 +274,6 @@ retry:
        ASSERT(!(flags & XFS_TRANS_RES_FDBLKS) ||
               xfs_has_lazysbcount(mp));
 
-       tp->t_magic = XFS_TRANS_HEADER_MAGIC;
        tp->t_flags = flags;
        tp->t_mountp = mp;
        INIT_LIST_HEAD(&tp->t_items);
index 71c2e82e4dadfffc632db9b10cde6859dbf8b9fd..2b366851e9a4f428d12b32ff4f856a65ef37cc49 100644 (file)
@@ -122,7 +122,6 @@ void        xfs_log_item_init(struct xfs_mount *mp, struct xfs_log_item *item,
  * This is the structure maintained for every active transaction.
  */
 typedef struct xfs_trans {
-       unsigned int            t_magic;        /* magic number */
        unsigned int            t_log_res;      /* amt of log space resvd */
        unsigned int            t_log_count;    /* count for perm log res */
        unsigned int            t_blk_res;      /* # of blocks resvd */