]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: use current->journal_info for detecting transaction recursion
authorDave Chinner <dchinner@redhat.com>
Tue, 23 Feb 2021 18:26:06 +0000 (10:26 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 25 Feb 2021 16:07:04 +0000 (08:07 -0800)
commitc5049a0f7ef17c46006181505c23614d3be5f000
tree901db3f2a70fa09b78defb0dac555948fda57b1e
parente620f2b1942965de3fdacd30d716bc182114d8db
xfs: use current->journal_info for detecting transaction recursion

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: 64c7771bd203 ("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>
fs/iomap/buffered-io.c
fs/xfs/libxfs/xfs_btree.c
fs/xfs/xfs_aops.c
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans.h