On Mon, Nov 25, 2024 at 09:11:23PM -0800, Christoph Hellwig wrote: > On Mon, Nov 25, 2024 at 09:11:06PM -0800, Christoph Hellwig wrote: > > On Mon, Nov 25, 2024 at 05:28:37PM -0800, Darrick J. Wong wrote: > > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > > > 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. > > > > Hmm, I don't think the current version is a recursion, because the > > is keyed off the regrant argument. That being said the new version is > > a lot cleaner, but maybe adjust the commit log and drop the fixes tag? How about: "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." > With that: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> Thanks! --D