HomeFreeBSD

unionfs(): destroy root vnode if upper registration fails

Description

unionfs(): destroy root vnode if upper registration fails

If unionfs_domount() fails, the mount path will not call VFS_UNMOUNT()
to clean up after it. If this failure happens during upper vnode
registration, the unionfs root vnode will already be allocated.
vflush() it in order to prevent the vnode from being leaked and the
subsequent vfs_mount_destroy() call from getting stuck waiting for
the mountpoint reference count to drain.

Reviewed by: kib, markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D39767

Details

Provenance
jahAuthored on Mar 26 2023, 1:50 AM
Reviewer
kib
Differential Revision
D39767: Various fixes to unionfs error handling logic
Parents
rG0745d837c2e9: unionfs: prevent upperrootvp from being recycled during mount
Branches
Unknown
Tags
Unknown