]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: avoid nested calls to __xfs_trans_commit
authorDarrick J. Wong <djwong@kernel.org>
Fri, 7 Feb 2025 19:26:33 +0000 (11:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:44 +0000 (10:05 +0100)
commitee93e08d4c8be850e5283098e428663684c9a6c1
tree4f29e14d42fe54b3cca1e9c6765d61e0a04b6711
parent9be0b25adeb2e2383351fdd9f8c9ec75dddcc4e0
xfs: avoid nested calls to __xfs_trans_commit

commit e96c1e2f262e0993859e266e751977bfad3ca98a upstream

Currently, __xfs_trans_commit calls xfs_defer_finish_noroll, which calls
__xfs_trans_commit again on the same transaction.  In other words,
there's function recursion that has caused minor amounts of confusion in
the past.  There's no reason to keep this around, since there's only one
place where we actually want the xfs_defer_finish_noroll, and that is in
the top level xfs_trans_commit call.

Fixes: 98719051e75ccf ("xfs: refactor internal dfops initialization")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_trans.c