xfs: hoist recovered refcount intent checks out of xfs_cui_item_recover
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)
commited64f8343aafa62e762c74dfb400f640b6fa6c15
tree0725ff072c042c51601356c34f304ede6ecbcade
parentc447ad62dc906f4b5f788e8ff20c1768ab2eab2c
xfs: hoist recovered refcount intent checks out of xfs_cui_item_recover

When we recover a refcount intent from the log, we need to validate its
contents before we try to replay them.  Hoist the checking code into a
separate function in preparation to refactor this code to use validation
helpers.

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