Skip to content

Commit e69682e

Browse files
author
Darrick J. Wong
committed
xfs: remove xfs_trans_set_refcount_flags
Remove this single-use helper. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent 886f11c commit e69682e

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

fs/xfs/xfs_refcount_item.c

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -243,25 +243,6 @@ xfs_refcount_update_diff_items(
243243
return ra->ri_pag->pag_agno - rb->ri_pag->pag_agno;
244244
}
245245

246-
/* Set the phys extent flags for this reverse mapping. */
247-
static void
248-
xfs_trans_set_refcount_flags(
249-
struct xfs_phys_extent *pmap,
250-
enum xfs_refcount_intent_type type)
251-
{
252-
pmap->pe_flags = 0;
253-
switch (type) {
254-
case XFS_REFCOUNT_INCREASE:
255-
case XFS_REFCOUNT_DECREASE:
256-
case XFS_REFCOUNT_ALLOC_COW:
257-
case XFS_REFCOUNT_FREE_COW:
258-
pmap->pe_flags |= type;
259-
break;
260-
default:
261-
ASSERT(0);
262-
}
263-
}
264-
265246
/* Log refcount updates in the intent item. */
266247
STATIC void
267248
xfs_refcount_update_log_item(
@@ -282,7 +263,18 @@ xfs_refcount_update_log_item(
282263
pmap = &cuip->cui_format.cui_extents[next_extent];
283264
pmap->pe_startblock = ri->ri_startblock;
284265
pmap->pe_len = ri->ri_blockcount;
285-
xfs_trans_set_refcount_flags(pmap, ri->ri_type);
266+
267+
pmap->pe_flags = 0;
268+
switch (ri->ri_type) {
269+
case XFS_REFCOUNT_INCREASE:
270+
case XFS_REFCOUNT_DECREASE:
271+
case XFS_REFCOUNT_ALLOC_COW:
272+
case XFS_REFCOUNT_FREE_COW:
273+
pmap->pe_flags |= ri->ri_type;
274+
break;
275+
default:
276+
ASSERT(0);
277+
}
286278
}
287279

288280
static struct xfs_log_item *

0 commit comments

Comments
 (0)