diff options
author | Christoph Hellwig <hch@lst.de> | 2021-03-29 21:11:43 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-04-08 00:37:05 +0300 |
commit | ee7b83fd365e32beaa405d60b8c42f42ec5f42c2 (patch) | |
tree | aa696b58d9c472abd855f6ed445fd3d3fd21c921 /fs/xfs/xfs_inode.c | |
parent | b231b1221b39bdf7ec4e45b05656bcba7d6a2153 (diff) | |
download | linux-ee7b83fd365e32beaa405d60b8c42f42ec5f42c2.tar.xz |
xfs: use a union for i_cowextsize and i_flushiter
The i_cowextsize field is only used for v3 inodes, and the i_flushiter
field is only used for v1/v2 inodes. Use a union to pack the inode a
littler better after adding a few missing guards around their usage.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 06d779c9334b..e483c380afd1 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -3483,8 +3483,10 @@ xfs_iflush( xfs_inode_to_disk(ip, dip, iip->ili_item.li_lsn); /* Wrap, we never let the log put out DI_MAX_FLUSH */ - if (ip->i_flushiter == DI_MAX_FLUSH) - ip->i_flushiter = 0; + if (!xfs_sb_version_has_v3inode(&mp->m_sb)) { + if (ip->i_flushiter == DI_MAX_FLUSH) + ip->i_flushiter = 0; + } xfs_iflush_fork(ip, dip, iip, XFS_DATA_FORK); if (XFS_IFORK_Q(ip)) |