diff options
author | 2021-03-29 11:11:43 -0700 | |
---|---|---|
committer | 2021-04-07 14:37:05 -0700 | |
commit | ee7b83fd365e32beaa405d60b8c42f42ec5f42c2 (patch) | |
tree | aa696b58d9c472abd855f6ed445fd3d3fd21c921 /fs/xfs/xfs_inode.c | |
parent | xfs: use XFS_B_TO_FSB in xfs_ioctl_setattr (diff) | |
download | linux-ee7b83fd365e32beaa405d60b8c42f42ec5f42c2.tar.gz linux-ee7b83fd365e32beaa405d60b8c42f42ec5f42c2.tar.bz2 linux-ee7b83fd365e32beaa405d60b8c42f42ec5f42c2.zip |
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)) |