xfs: drop the scrub file's iolock when transaction allocation fails
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 16:48:27 +0000 (09:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 23:55:18 +0000 (16:55 -0700)
commit66917537522312a6e462787f0f347d6998cf7038
treeac4a249854e0f2b3a1230e78278c76ed67b93a0f
parent4ad350ac58627bfe81f71f43f6738e36b4eb75c6
xfs: drop the scrub file's iolock when transaction allocation fails

If the transaction allocation in the !orphanage_available case of
xrep_nlinks_repair_inode fails, we need to drop the IOLOCK of the file
being scrubbed before exiting.

Found by fuzzing u3.sfdir3.list[1].name = zeroes in xfs/1546.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/nlinks_repair.c