Close a file as opened with vnode_open().
- macOS 10.4+
The vnode to close.
Flags to close: FWASWRITTEN indicates that the file was written to.
Context against which to validate operation.
0 for success or an error from the filesystem.
vnode_close() drops the refcount (persistent reference) picked up in vnode_open() and calls down to the filesystem with VNOP_CLOSE. It should be called with both an iocount and a refcount on the vnode and will drop both.