Skip to content

Commit fbeef4e

Browse files
Christoph HellwigDarrick J. Wong
authored andcommitted
xfs: pass a 'bool is_finobt' to xfs_inobt_insert
This is one of the last users of xfs_btnum_t and can only designate either the inobt or finobt. Replace it with a simple bool. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
1 parent 14dd46c commit fbeef4e

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

fs/xfs/libxfs/xfs_ialloc.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ xfs_inobt_insert(
206206
struct xfs_buf *agbp,
207207
xfs_agino_t newino,
208208
xfs_agino_t newlen,
209-
xfs_btnum_t btnum)
209+
bool is_finobt)
210210
{
211211
struct xfs_btree_cur *cur;
212212
xfs_agino_t thisino;
213213
int i;
214214
int error;
215215

216-
if (btnum == XFS_BTNUM_FINO)
216+
if (is_finobt)
217217
cur = xfs_finobt_init_cursor(pag, tp, agbp);
218218
else
219219
cur = xfs_inobt_init_cursor(pag, tp, agbp);
@@ -941,14 +941,13 @@ xfs_ialloc_ag_alloc(
941941
}
942942
} else {
943943
/* full chunk - insert new records to both btrees */
944-
error = xfs_inobt_insert(pag, tp, agbp, newino, newlen,
945-
XFS_BTNUM_INO);
944+
error = xfs_inobt_insert(pag, tp, agbp, newino, newlen, false);
946945
if (error)
947946
return error;
948947

949948
if (xfs_has_finobt(args.mp)) {
950949
error = xfs_inobt_insert(pag, tp, agbp, newino,
951-
newlen, XFS_BTNUM_FINO);
950+
newlen, true);
952951
if (error)
953952
return error;
954953
}

0 commit comments

Comments
 (0)