diff options
author | Christoph Hellwig <hch@lst.de> | 2020-03-18 16:15:10 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-19 16:48:47 +0100 |
commit | e9e2eae89ddb658ea332295153fdca78c12c1e0d (patch) | |
tree | 025550d66e81ea683b374a555f473b8ae8df8033 /fs/xfs/libxfs/xfs_inode_fork.c | |
parent | xfs: add a new xfs_sb_version_has_v3inode helper (diff) | |
download | linux-e9e2eae89ddb658ea332295153fdca78c12c1e0d.tar.xz linux-e9e2eae89ddb658ea332295153fdca78c12c1e0d.zip |
xfs: only check the superblock version for dinode size calculation
The size of the dinode structure is only dependent on the file system
version, so instead of checking the individual inode version just use
the newly added xfs_sb_version_has_large_dinode helper, and simplify
various calling conventions.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c index ad2b9c313fd2..518c6f0ec3a6 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.c +++ b/fs/xfs/libxfs/xfs_inode_fork.c @@ -183,7 +183,7 @@ xfs_iformat_local( */ if (unlikely(size > XFS_DFORK_SIZE(dip, ip->i_mount, whichfork))) { xfs_warn(ip->i_mount, - "corrupt inode %Lu (bad size %d for local fork, size = %d).", + "corrupt inode %Lu (bad size %d for local fork, size = %zd).", (unsigned long long) ip->i_ino, size, XFS_DFORK_SIZE(dip, ip->i_mount, whichfork)); xfs_inode_verifier_error(ip, -EFSCORRUPTED, |