xfs: fix a rtgroup leak when xfs_init_zone fails
PATCH 1/1 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 <[email protected]>
--- fs/xfs/xfs_zone_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/xfs/xfs_zone_alloc.c +3 -1
@@ -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; + } } }
Signature · 1 line
2.47.3
Quoted 15 lines · Christoph Hellwig
Drop the rtgrop reference when
xfs_init_zonefails for a conventional device.Fixes 4e4d52075577 ("xfs: add the zoned space allocator")Signed-off-by Christoph Hellwig <[email protected]>--- fs/xfs/xfs_zone_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fs/xfs/xfs_zone_alloc.c +0
-0@@ -1249,8 +1249,10 @@ xfs_mount_zones(
fs/xfs/xfs_zone_alloc.c xfs_mount_zones( · line 1258
Quoted 10 lines
fs/xfs/xfs_zone_alloc.c +3
-1while ((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; + } } }
Looks good,
Reviewed-by Hans Holmberg <[email protected]>
Quoted 4 lines · Christoph Hellwig
Drop the rtgrop reference when
xfs_init_zonefails for a conventional device.
Applied to for-next, thanks!
[1/1] xfs: fix a rtgroup leak when xfs_init_zone fails
commit: f5714a3c1a5658251360603231efe1bee21f9c2c
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>