xfs: only invalidate blocks if we're going to free them
authorDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:02 +0000 (07:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:02 +0000 (07:48 -0700)
commit8e54e06b5c7dd44b5d52581ef60a94b178aa878f
tree7253c8987e39df222c375a9fe5015718fe67ce63
parente06ef14b9f8eb5edab8c466680818d436eefdff0
xfs: only invalidate blocks if we're going to free them

When we're discarding old btree blocks after a repair, only invalidate
the buffers for the ones that we're freeing -- if the metadata was
crosslinked with another data structure, we don't want to touch it.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/reap.c
fs/xfs/scrub/repair.h