summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_item.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-11-30 10:23:19 -0800
committerDarrick J. Wong <djwong@kernel.org>2023-12-06 18:45:16 -0800
commite6e5299fcbf0b18cad45cd58f99787549c790857 (patch)
tree4413d47296323605b5c080516ae0203a95df6e47 /fs/xfs/xfs_bmap_item.c
parent3dd75c8db1c1675a26d3e228bab349c1fc065867 (diff)
downloadlinux-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_bmap_item.c')
-rw-r--r--fs/xfs/xfs_bmap_item.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c
index 913315cb5123..79d19b5b0e5e 100644
--- a/fs/xfs/xfs_bmap_item.c
+++ b/fs/xfs/xfs_bmap_item.c
@@ -238,20 +238,6 @@ xfs_trans_get_bud(
return budp;
}
-/*
- * Finish an bmap update and log it to the BUD. Note that the
- * transaction is marked dirty regardless of whether the bmap update
- * succeeds or fails to support the BUI/BUD lifecycle rules.
- */
-static int
-xfs_trans_log_finish_bmap_update(
- struct xfs_trans *tp,
- struct xfs_bud_log_item *budp,
- struct xfs_bmap_intent *bi)
-{
- return xfs_bmap_finish_one(tp, bi);
-}
-
/* Sort bmap intents by inode. */
static int
xfs_bmap_update_diff_items(
@@ -378,7 +364,7 @@ xfs_bmap_update_put_group(
xfs_perag_intent_put(bi->bi_pag);
}
-/* Process a deferred rmap update. */
+/* Process a deferred bmap update. */
STATIC int
xfs_bmap_update_finish_item(
struct xfs_trans *tp,
@@ -391,7 +377,7 @@ xfs_bmap_update_finish_item(
bi = container_of(item, struct xfs_bmap_intent, bi_list);
- error = xfs_trans_log_finish_bmap_update(tp, BUD_ITEM(done), bi);
+ error = xfs_bmap_finish_one(tp, bi);
if (!error && bi->bi_bmap.br_blockcount > 0) {
ASSERT(bi->bi_type == XFS_BMAP_UNMAP);
return -EAGAIN;