mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
b231b1221b
commit
ee7b83fd36
4 changed files with 20 additions and 11 deletions
|
@ -193,7 +193,8 @@ xfs_inode_from_disk(
|
|||
* inode. If the inode is unused, mode is zero and we shouldn't mess
|
||||
* with the uninitialized part of it.
|
||||
*/
|
||||
ip->i_flushiter = be16_to_cpu(from->di_flushiter);
|
||||
if (!xfs_sb_version_has_v3inode(&ip->i_mount->m_sb))
|
||||
ip->i_flushiter = be16_to_cpu(from->di_flushiter);
|
||||
inode->i_generation = be32_to_cpu(from->di_gen);
|
||||
inode->i_mode = be16_to_cpu(from->di_mode);
|
||||
if (!inode->i_mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue