HomeFreeBSD

pseudofs: make readdir work without a pid again

Description

pseudofs: make readdir work without a pid again

Specifically, the following was broken:

$ mount -t procfs procfs /proc
$ ls -l /proc

r351741 reworked readdir slightly to avoid pfs_node/pidhash LOR, but
inadvertently regressed pid == NO_PID; new pfs_lookup_proc() fails for the
obvious reasons, and later pfs_visible_proc doesn't capture the
pid == NO_PID -> return 1 aspect of pfs_visible. We can infact skip this
whole block if we're operating on a directory w/ NO_PID, as it's always
visible.

Reported by: trasz
Reviewed by: mjg
Differential Revision: https://reviews.freebsd.org/D21518

Details

Provenance
kevansAuthored on
Reviewer
mjg
Differential Revision
D21518: pseudofs: make readdir work without a pid again
Parents
rS351814: MFC: r351231, r351233
Branches
Unknown
Tags
Unknown