]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: make xchk_iget safer in the presence of corrupt inode btrees
authorDarrick J. Wong <djwong@kernel.org>
Wed, 27 Mar 2024 00:12:20 +0000 (17:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:47 +0000 (15:28 +0200)
commitfb6e584e74710a1b7caee9dac59b494a37e07a62
treee939f480215f1e4ab1befbc1221ec682a6ac668b
parent3f63080344326cd3ccfa0f3e9f461fe5b8f501c1
xfs: make xchk_iget safer in the presence of corrupt inode btrees

commit 3f113c2739b1b068854c7ffed635c2bd790d1492 upstream.

When scrub is trying to iget an inode, ensure that it won't end up
deadlocked on a cycle in the inode btree by using an empty transaction
to store all the buffers.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/inode.c