process_inode uses a local convenience variable to abstract the
differences between the ondisk nlink fields in a v1 inode and a v2
inode. Use this variable for checking and reporting errors.
Fixes: 6526f30e4801 ("xfs_db: stop misusing an onstack inode")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
be64_to_cpu(dip->di_nblocks), ino);
error++;
}
- if (dip->di_nlink != 0) {
+ if (nlink != 0) {
if (v)
dbprintf(_("bad nlink %d for free inode %lld\n"),
- be32_to_cpu(dip->di_nlink), ino);
+ nlink, ino);
error++;
}
if (dip->di_mode != 0) {