Skip to content

Commit 372fe0b

Browse files
author
Darrick J. Wong
committed
xfs: remove xfs_trans_set_bmap_flags
Remove this single-use helper. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent 2a15e76 commit 372fe0b

1 file changed

Lines changed: 13 additions & 25 deletions

File tree

fs/xfs/xfs_bmap_item.c

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -236,29 +236,6 @@ xfs_bmap_update_diff_items(
236236
return ba->bi_owner->i_ino - bb->bi_owner->i_ino;
237237
}
238238

239-
/* Set the map extent flags for this mapping. */
240-
static void
241-
xfs_trans_set_bmap_flags(
242-
struct xfs_map_extent *map,
243-
enum xfs_bmap_intent_type type,
244-
int whichfork,
245-
xfs_exntst_t state)
246-
{
247-
map->me_flags = 0;
248-
switch (type) {
249-
case XFS_BMAP_MAP:
250-
case XFS_BMAP_UNMAP:
251-
map->me_flags = type;
252-
break;
253-
default:
254-
ASSERT(0);
255-
}
256-
if (state == XFS_EXT_UNWRITTEN)
257-
map->me_flags |= XFS_BMAP_EXTENT_UNWRITTEN;
258-
if (whichfork == XFS_ATTR_FORK)
259-
map->me_flags |= XFS_BMAP_EXTENT_ATTR_FORK;
260-
}
261-
262239
/* Log bmap updates in the intent item. */
263240
STATIC void
264241
xfs_bmap_update_log_item(
@@ -281,8 +258,19 @@ xfs_bmap_update_log_item(
281258
map->me_startblock = bi->bi_bmap.br_startblock;
282259
map->me_startoff = bi->bi_bmap.br_startoff;
283260
map->me_len = bi->bi_bmap.br_blockcount;
284-
xfs_trans_set_bmap_flags(map, bi->bi_type, bi->bi_whichfork,
285-
bi->bi_bmap.br_state);
261+
262+
switch (bi->bi_type) {
263+
case XFS_BMAP_MAP:
264+
case XFS_BMAP_UNMAP:
265+
map->me_flags = bi->bi_type;
266+
break;
267+
default:
268+
ASSERT(0);
269+
}
270+
if (bi->bi_bmap.br_state == XFS_EXT_UNWRITTEN)
271+
map->me_flags |= XFS_BMAP_EXTENT_UNWRITTEN;
272+
if (bi->bi_whichfork == XFS_ATTR_FORK)
273+
map->me_flags |= XFS_BMAP_EXTENT_ATTR_FORK;
286274
}
287275

288276
static struct xfs_log_item *

0 commit comments

Comments
 (0)