mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
xfs: fix a rtgroup leak when xfs_init_zone fails
Drop the rtgrop reference when xfs_init_zone fails for a conventional
device.
Fixes: 4e4d520755 ("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>
This commit is contained in:
parent
8d7bba1e83
commit
f5714a3c1a
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user