]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: use current->journal_info for detecting transaction recursion
authorDave Chinner <dchinner@redhat.com>
Wed, 7 Apr 2021 16:00:36 +0000 (12:00 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 7 Apr 2021 16:00:36 +0000 (12:00 -0400)
commitcf47075fcf6f83f7b3aa40fd90aac3a0614b65d6
tree494c210024921ba38a48cac86bd25982a0d1b546
parent339c7931d8b5cd5a88352c08d458a7a74469bb58
xfs: use current->journal_info for detecting transaction recursion

Source kernel commit: 756b1c343333a5aefcc26b0409f3fd16f72281bf

Because the iomap code using PF_MEMALLOC_NOFS to detect transaction
recursion in XFS is just wrong. Remove it from the iomap code and
replace it with XFS specific internal checks using
current->journal_info instead.

[djwong: This change also realigns the lifetime of NOFS flag changes to
match the incore transaction, instead of the inconsistent scheme we have
now.]

Fixes: 9070733b4efa ("xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS")
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_btree.c