]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
xfs: fix copy-paste error in previous fix
authorDarrick J. Wong <djwong@kernel.org>
Wed, 18 Feb 2026 23:25:35 +0000 (15:25 -0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:36 +0000 (07:21 -0500)
[ Upstream commit e764dd439d68cfc16724e469db390d779ab49521 ]

Chris Mason noticed that there is a copy-paste error in a recent change
to xrep_dir_teardown that nulls out pointers after freeing the
resources.

Fixes: ba408d299a3bb3c ("xfs: only call xf{array,blob}_destroy if we have a valid pointer")
Link: https://lore.kernel.org/linux-xfs/20260205194211.2307232-1-clm@meta.com/
Reported-by: Chris Mason <clm@meta.com>
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/scrub/dir_repair.c

index d5a55eabf68012c3d2049a8bac326f2977c55440..e0fa5e6ca1fe8d113e35a44c00179266a2c251c8 100644 (file)
@@ -177,7 +177,7 @@ xrep_dir_teardown(
        rd->dir_names = NULL;
        if (rd->dir_entries)
                xfarray_destroy(rd->dir_entries);
-       rd->dir_names = NULL;
+       rd->dir_entries = NULL;
 }
 
 /* Set up for a directory repair. */