diff options
| author | Christoph Hellwig <hch@lst.de> | 2025-11-04 08:50:53 -0500 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2025-11-05 16:53:49 +0100 |
| commit | f5714a3c1a5658251360603231efe1bee21f9c2c (patch) | |
| tree | 594fb8caeee568e5c486a07f6e9cf4f4017a47b2 /fs/xfs/xfs_zone_alloc.c | |
| parent | 8d7bba1e8314013ecc817a91624104ceb9352ddc (diff) | |
xfs: fix a rtgroup leak when xfs_init_zone fails
Drop the rtgrop reference when xfs_init_zone fails for a conventional
device.
Fixes: 4e4d52075577 ("xfs: add the zoned space allocator")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_zone_alloc.c')
| -rw-r--r-- | fs/xfs/xfs_zone_alloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c index 040402240807..fa76fa4ba0f9 100644 --- a/fs/xfs/xfs_zone_alloc.c +++ b/fs/xfs/xfs_zone_alloc.c @@ -1249,8 +1249,10 @@ xfs_mount_zones( while ((rtg = xfs_rtgroup_next(mp, rtg))) { error = xfs_init_zone(&iz, rtg, NULL); - if (error) + if (error) { + xfs_rtgroup_rele(rtg); goto out_free_zone_info; + } } } |