]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:16 +0000 (07:21 -0500)
commitc9ccefacae0d8091683447bc338bd7741417039d
tree710d555c0630321c8f148ff30890ddfc907b363a
parentc2ce8d9a3b9899e780eb959c53b34e6f8094b9c7
xfs: only call xf{array,blob}_destroy if we have a valid pointer

[ Upstream commit ba408d299a3bb3c5309f40c5326e4fb83ead4247 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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