Skip to content

Commit 471511d

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
xfs: remove the t_magic field in struct xfs_trans
The t_magic field is only ever assigned to, but never read. Remove it. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent 415dee1 commit 471511d

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

fs/xfs/xfs_trans.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ xfs_trans_dup(
100100
/*
101101
* Initialize the new transaction structure.
102102
*/
103-
ntp->t_magic = XFS_TRANS_HEADER_MAGIC;
104103
ntp->t_mountp = tp->t_mountp;
105104
INIT_LIST_HEAD(&ntp->t_items);
106105
INIT_LIST_HEAD(&ntp->t_busy);
@@ -275,7 +274,6 @@ xfs_trans_alloc(
275274
ASSERT(!(flags & XFS_TRANS_RES_FDBLKS) ||
276275
xfs_has_lazysbcount(mp));
277276

278-
tp->t_magic = XFS_TRANS_HEADER_MAGIC;
279277
tp->t_flags = flags;
280278
tp->t_mountp = mp;
281279
INIT_LIST_HEAD(&tp->t_items);

fs/xfs/xfs_trans.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ void xfs_log_item_init(struct xfs_mount *mp, struct xfs_log_item *item,
122122
* This is the structure maintained for every active transaction.
123123
*/
124124
typedef struct xfs_trans {
125-
unsigned int t_magic; /* magic number */
126125
unsigned int t_log_res; /* amt of log space resvd */
127126
unsigned int t_log_count; /* count for perm log res */
128127
unsigned int t_blk_res; /* # of blocks resvd */

0 commit comments

Comments
 (0)