do_execve() will hold the vnode lock shared when it calls VOP_OPEN(),
but unionfs_open() requires the lock to be held exclusive to
correctly synchronize node status updates. This requirement is
asserted in unionfs_get_node_status().
Change unionfs_open() to temporarily upgrade the lock as is already
done in unionfs_close(). Also fix a related issue in which
unionfs_lock() can incorrectly add LK_NOWAIT during a downgrade
operation, which trips a lockmgr assertion. Finally, add some
comments to clarify the expected behavior in cases where the vnode
may be doomed while its lock is temporarily dropped.
unionfs: add stress2 scenarios for write references
Add some test cases, based on the existing nullfs10 scenario, to
ensure that unionfs write references are propagated between the
unionfs and underlying vnodes, including unionfs copy-on-write
operations