xfs: improve the code that checks recovered refcount intent items
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 30 Nov 2020 00:33:37 +0000 (16:33 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 9 Dec 2020 17:49:38 +0000 (09:49 -0800)
commit0d79781a1aa6a6a567e63294012eee2384f406f2
tree69bbac8e979c773fa87ef713c3313fdc1cb5e10f
parented64f8343aafa62e762c74dfb400f640b6fa6c15
xfs: improve the code that checks recovered refcount intent items

The code that validates recovered refcount intent items is kind of a
mess -- it doesn't use the standard xfs type validators, and it doesn't
check for things that it should.  Fix the validator function to use the
standard validation helpers and look for more types of obvious errors.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_refcount_item.c