]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: check return value of xchk_scrub_create_subord
authorDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:38 +0000 (09:27 -0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:16 +0000 (07:21 -0500)
commit2b658d1249666cc55af9484dcf5f45ca438d4ecc
tree7e4178a31a4463f619c64f5d06aeebf7f1a47b0a
parentc9ccefacae0d8091683447bc338bd7741417039d
xfs: check return value of xchk_scrub_create_subord

[ Upstream commit ca27313fb3f23e4ac18532ede4ec1c7cc5814c4a ]

Fix this function to return NULL instead of a mangled ENOMEM, then fix
the callers to actually check for a null pointer and return ENOMEM.
Most of the corrections here are for code merged between 6.2 and 6.10.

Cc: r772577952@gmail.com
Cc: <stable@vger.kernel.org> # v6.12
Fixes: 1a5f6e08d4e379 ("xfs: create subordinate scrub contexts for xchk_metadata_inode_subtype")
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/common.c
fs/xfs/scrub/repair.c
fs/xfs/scrub/scrub.c