]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: fully check the parent handle when it points to the rootdir
authorDarrick J. Wong <djwong@kernel.org>
Tue, 14 Jul 2026 06:06:59 +0000 (23:06 -0700)
committerCarlos Maiolino <cem@kernel.org>
Tue, 14 Jul 2026 09:01:47 +0000 (11:01 +0200)
commitba150ce63453ccd74bae1404c1dfedbd01ecfd55
tree891d422dd9040b94eca09cc83fea5200d4e3a330
parent353a5900bc85234e7df05caac37698042dc26348
xfs: fully check the parent handle when it points to the rootdir

LOLLM noticed that the directory tree path checking declares the path to
be ok if the inumber in the parent pointer reaches the root directory.
Unfortunately, it neglects to check that the generation is correct.  Fix
that by moving the generation check up.

Cc: stable@vger.kernel.org # v6.10
Fixes: 928b721a11789a ("xfs: teach online scrub to find directory tree structure problems")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/scrub/dirtree.c