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>
This commit is contained in:
parent
4ad350ac58
commit
6691753752
@ -138,8 +138,10 @@ xrep_nlinks_repair_inode(
|
||||
|
||||
error = xfs_trans_alloc(mp, &M_RES(mp)->tr_link, 0, 0, 0,
|
||||
&sc->tp);
|
||||
if (error)
|
||||
if (error) {
|
||||
xchk_iunlock(sc, XFS_IOLOCK_EXCL);
|
||||
return error;
|
||||
}
|
||||
|
||||
xchk_ilock(sc, XFS_ILOCK_EXCL);
|
||||
xfs_trans_ijoin(sc->tp, ip, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user