---
title: vn_revoke
framework: Kernel
role: symbol
role_heading: Function
platforms: [macOS 10.4+]
path: kernel/1562348-vn_revoke
---

# vn_revoke

Invalidate all references to a vnode.

## Declaration

```occ
int vn_revoke(vnode_t vp, int flags, vfs_context_t ctx);
```

## Parameters

- `vp`: The vnode to revoke.
- `flags`: Unused.
- `ctx`: Context against which to validate operation.

## Return Value

Return Value 0 always.

## Discussion

Discussion Reclaims the vnode, giving it deadfs vnops (though not halting operations which are already in progress). Also reclaims all aliased vnodes (important for devices). People holding usecounts on the vnode, e.g. processes with the file open, will find that all subsequent operations but closing the file fail.
