diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-11-30 10:23:19 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-12-06 18:45:16 -0800 |
commit | e6e5299fcbf0b18cad45cd58f99787549c790857 (patch) | |
tree | 4413d47296323605b5c080516ae0203a95df6e47 /fs/xfs/xfs_refcount_item.c | |
parent | 3dd75c8db1c1675a26d3e228bab349c1fc065867 (diff) | |
download | linux-e6e5299fcbf0b18cad45cd58f99787549c790857.tar.gz linux-e6e5299fcbf0b18cad45cd58f99787549c790857.tar.bz2 linux-e6e5299fcbf0b18cad45cd58f99787549c790857.zip |
xfs: collapse the ->finish_item helpers
Each log item's ->finish_item function sets up a small amount of state
and calls another function to do the work. Collapse that other function
into ->finish_item to reduce the call stack height.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_refcount_item.c')
-rw-r--r-- | fs/xfs/xfs_refcount_item.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/xfs/xfs_refcount_item.c b/fs/xfs/xfs_refcount_item.c index 2628b1e3969c..7273f538db2e 100644 --- a/fs/xfs/xfs_refcount_item.c +++ b/fs/xfs/xfs_refcount_item.c @@ -244,21 +244,6 @@ xfs_trans_get_cud( return cudp; } -/* - * Finish an refcount update and log it to the CUD. Note that the - * transaction is marked dirty regardless of whether the refcount - * update succeeds or fails to support the CUI/CUD lifecycle rules. - */ -static int -xfs_trans_log_finish_refcount_update( - struct xfs_trans *tp, - struct xfs_cud_log_item *cudp, - struct xfs_refcount_intent *ri, - struct xfs_btree_cur **pcur) -{ - return xfs_refcount_finish_one(tp, ri, pcur); -} - /* Sort refcount intents by AG. */ static int xfs_refcount_update_diff_items( @@ -383,10 +368,9 @@ xfs_refcount_update_finish_item( int error; ri = container_of(item, struct xfs_refcount_intent, ri_list); - error = xfs_trans_log_finish_refcount_update(tp, CUD_ITEM(done), ri, - state); /* Did we run out of reservation? Requeue what we didn't finish. */ + error = xfs_refcount_finish_one(tp, ri, state); if (!error && ri->ri_blockcount > 0) { ASSERT(ri->ri_type == XFS_REFCOUNT_INCREASE || ri->ri_type == XFS_REFCOUNT_DECREASE); |