pub const MAX_DEPTH: usize = 128; // 128usizeExpand description
How deep the walk nests before it assumes the tree is cyclic. 遍历在假定树存在环之前允许达到的深度。
The kernel takes filesystem facts from its caller and cannot canonicalize a path, so it cannot tell a link that points at an ancestor from a directory that is simply deep. A bound is what keeps the workspace’s only recursive traversal from overflowing the stack; 128 directories is far past any real source layout, and a tree that reaches it is reported rather than followed. 内核的文件系统事实来自调用方,且无法 canonicalize 路径,因此它分不出“指向祖先的链接“ 与“确实很深的目录“。能阻止 workspace 唯一的递归遍历栈溢出的东西就是一条深度上限; 128 层远超任何真实源码布局,而达到它的树会被报告而不是继续跟随。