Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christoph Hellwig and committed by
Carlos Maiolino
f5714a3c 8d7bba1e

+3 -1
+3 -1
fs/xfs/xfs_zone_alloc.c
··· 1249 1249 1250 1250 while ((rtg = xfs_rtgroup_next(mp, rtg))) { 1251 1251 error = xfs_init_zone(&iz, rtg, NULL); 1252 - if (error) 1252 + if (error) { 1253 + xfs_rtgroup_rele(rtg); 1253 1254 goto out_free_zone_info; 1255 + } 1254 1256 } 1255 1257 } 1256 1258