]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: improve the xg_active_ref check in xfs_group_free
authorChristoph Hellwig <hch@lst.de>
Mon, 6 Oct 2025 12:40:18 +0000 (14:40 +0200)
committerAndrey Albershteyn <aalbersh@kernel.org>
Mon, 13 Oct 2025 09:53:39 +0000 (11:53 +0200)
commitc6135e4201a1290d9d62a3e5f437b5745ad9c16c
tree9626f18a81c2edcfbc7c393b083078402f7e4a71
parentfc46966ce3d53f0106620637dce2f3221da75124
xfs: improve the xg_active_ref check in xfs_group_free

Source kernel commit: 59655147ec34fb72cc090ca4ee688ece05ffac56

Split up the XFS_IS_CORRUPT statement so that it immediately shows
if the reference counter overflowed or underflowed.

I ran into this quite a bit when developing the zoned allocator, and had
to reapply the patch for some work recently.  We might as well just apply
it upstream given that freeing group is far removed from performance
critical code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
libxfs/xfs_group.c