HomeFreeBSD

devfs_vptocnp(): correct the component name when node is not at top.

Description

devfs_vptocnp(): correct the component name when node is not at top.

Node' cdp.si_name is the full path as provided by make_dev(9), it
should not be returned by VOP_VPTOCNP() when only the last component
is requested. Use the dirent entry instead.

With this note, handling of VDIR and VCHR nodes only differs in
handling of root vnode, which simplifies and unifies the logic.

Reported by: Li, Zhichao1 <Zhichao_Li1@Dell.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Committed
kibOct 11 2019, 6:41 PM
Parents
rS353446: Plug the rest of undef behavior places that were missed in r337456.
Branches
Unknown
Tags
Unknown