[PATCH 3/7] xfs: put the open zone later xfs_open_zone_put

Christoph Hellwig
2026-03-30T05:46:03Z

The open zone is what holds the rtg reference for us. This doesn't
matter until we support shrinking, and even then is rather theoretical
because we can't shrink away a just filled zone in a tiny race window,
but let's play safe here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_zone_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c
index b0a6bc777c36..297a918bf28e 100644
--- a/fs/xfs/xfs_zone_alloc.c
+++ b/fs/xfs/xfs_zone_alloc.c
@@ -182,11 +182,11 @@ xfs_open_zone_mark_full(
list_del_init(&oz->oz_entry);
}
spin_unlock(&zi->zi_open_zones_lock);
- xfs_open_zone_put(oz);

wake_up_all(&zi->zi_zone_wait);
if (used < rtg_blocks(rtg))
xfs_zone_account_reclaimable(rtg, rtg_blocks(rtg) - used);
+ xfs_open_zone_put(oz);
}

static inline void
--
2.47.3