diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-02-06 19:01:50 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-02-12 01:07:01 +0100 |
commit | 2bfe7069f71e56a301976d08eae3027b1eebc30d (patch) | |
tree | 4badaf7cd87bb34af6834e8943f35c81030981c5 /fs/xfs/xfs_log_recover.c | |
parent | xfs: factor xfs_da3_blkinfo verification into common helper (diff) | |
download | linux-2bfe7069f71e56a301976d08eae3027b1eebc30d.tar.xz linux-2bfe7069f71e56a301976d08eae3027b1eebc30d.zip |
xfs: add inode magic to inode verifier
Use xfs_verify_magic to check the magic numbers of inodes.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 5ad42d598333..f5948d16015b 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -3049,7 +3049,7 @@ xlog_recover_inode_pass2( * Make sure the place we're flushing out to really looks * like an inode! */ - if (unlikely(dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC))) { + if (unlikely(!xfs_verify_magic(bp, dip->di_magic))) { xfs_alert(mp, "%s: Bad inode magic number, dip = "PTR_FMT", dino bp = "PTR_FMT", ino = %Ld", __func__, dip, bp, in_f->ilf_ino); |