The patch below should fix the issue. But I wonder if we should split the flags a bit better to make things more obvious. diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index c8c9b8d8309f..302efe54e2af 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -457,7 +457,8 @@ xfs_inumbers( * locking abilities to detect cycles in the inobt without deadlocking. */ tp = xfs_trans_alloc_empty(breq->mp); - error = xfs_inobt_walk(breq->mp, tp, breq->startino, breq->flags, + error = xfs_inobt_walk(breq->mp, tp, breq->startino, + breq->flags & XFS_IBULK_SAME_AG, xfs_inumbers_walk, breq->icount, &ic); xfs_trans_cancel(tp);