summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_extent_busy.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-11-03 20:18:42 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-11-05 13:38:28 -0800
commit6af1300d47d92fb4bb327886ffa63c287d63a5db (patch)
tree5c8b338765174a1cd33717ed6110d3ce039af8d3 /fs/xfs/xfs_extent_busy.c
parenteb4a84a3c2bd09efe770fa940fb68e349f90c8c6 (diff)
xfs: return the busy generation from xfs_extent_busy_list_empty
This avoid having to poke into the internals of the busy tracking in xrep_setup_ag_allocbt. 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>
Diffstat (limited to 'fs/xfs/xfs_extent_busy.c')
-rw-r--r--fs/xfs/xfs_extent_busy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_extent_busy.c b/fs/xfs/xfs_extent_busy.c
index 3d5a57d7ac5e..2806fc6ab480 100644
--- a/fs/xfs/xfs_extent_busy.c
+++ b/fs/xfs/xfs_extent_busy.c
@@ -667,12 +667,14 @@ xfs_extent_busy_ag_cmp(
/* Are there any busy extents in this AG? */
bool
xfs_extent_busy_list_empty(
- struct xfs_perag *pag)
+ struct xfs_perag *pag,
+ unsigned *busy_gen)
{
bool res;
spin_lock(&pag->pagb_lock);
res = RB_EMPTY_ROOT(&pag->pagb_tree);
+ *busy_gen = READ_ONCE(pag->pagb_gen);
spin_unlock(&pag->pagb_lock);
return res;
}