]> www.infradead.org Git - users/willy/pagecache.git/commit
xfs: avoid nested calls to __xfs_trans_commit
authorDarrick J. Wong <djwong@kernel.org>
Mon, 2 Dec 2024 18:57:34 +0000 (10:57 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 13 Dec 2024 01:45:11 +0000 (17:45 -0800)
commita004afdc62946d3261f724c6472997085c4f0735
tree42c3fd48de69acb3b5c0d651ccf90d3a8dedf8a5
parent44d9b07e52db25035680713c3428016cadcd2ea1
xfs: avoid nested calls to __xfs_trans_commit

Currently, __xfs_trans_commit calls xfs_defer_finish_noroll, which calls
__xfs_trans_commit again on the same transaction.  In other words,
there's a nested function call (albeit with slightly different
arguments) 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.

This also reduces stack usage a little bit.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_trans.c