]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: only call xf{array,blob}_destroy if we have a valid pointer
authorDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:37 +0000 (09:27 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Sat, 24 Jan 2026 16:46:36 +0000 (08:46 -0800)
commitba408d299a3bb3c5309f40c5326e4fb83ead4247
tree00e5c42ee3904cca6404c0011b9dc9be1611adba
parent60382993a2e18041f88c7969f567f168cd3b4de3
xfs: only call xf{array,blob}_destroy if we have a valid pointer

Only call the xfarray and xfblob destructor if we have a valid pointer,
and be sure to null out that pointer afterwards.  Note that this patch
fixes a large number of commits, most of which were merged between 6.9
and 6.10.

Cc: r772577952@gmail.com
Cc: <stable@vger.kernel.org> # v6.12
Fixes: ab97f4b1c03075 ("xfs: repair AGI unlinked inode bucket lists")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jiaming Zhang <r772577952@gmail.com>
fs/xfs/scrub/agheader_repair.c
fs/xfs/scrub/attr_repair.c
fs/xfs/scrub/dir_repair.c
fs/xfs/scrub/dirtree.c
fs/xfs/scrub/nlinks.c