HomeFreeBSD

diff: Improve directory loop detection

Description

diff: Improve directory loop detection

When we're done processing a directory, remove its entry from the tree
of visited inodes, ensuring that we only report a loop when we encounter
a descendant-to-ancestor link, not when we encounter a cousin-to-cousin
or sibling-to-sibling link.

MFC after: 1 week
Reported by: Bakul Shah <bakul@iitbombay.org>
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55248

(cherry picked from commit 71569594d860a59d8362770a56d806e1d31fb946)

Details

Provenance
desAuthored on Feb 11 2026, 4:24 PM
Reviewer
kevans
Differential Revision
D55248: diff: Improve directory loop detection
Parents
rG9f1bff69b0b8: install: Expect EINTR while copying
Branches
Unknown
Tags
Unknown