---
name: "VOP_INOTIFY"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/VOP_INOTIFY"
---

# VOP\_INOTIFY(9)

vnode inotify interface

## NAME

**VOP\_INOTIFY** – vnode inotify interface

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/vnode.h\>**

*int*\

**VOP\_INOTIFY**(*struct*, *vnode*, *\*vp*, *struct*, *vnode*, *\*dvp*, *struct*, *componentname*, *\*cnp*, *int*, *event*, *uint32\_t*, *cookie*);

*int*\

**VOP\_INOTIFY\_ADD\_WATCH**(*struct*, *vnode*, *\*vp*, *struct*, *inotify\_softc*, *\*sc*, *uint32\_t*, *mask*, *uint32\_t*, *\*wdp*, *struct*, *thread*, *\*td*);

## DESCRIPTION

The **VOP\_INOTIFY**() operation notifies the [inotify(2)](/inotify/2.md) subsystem of a file system event on a vnode. The *dvp* and *cnp* arguments are optional and are only used to obtain a file name for the event. If they are omitted, the inotify subsystem will use the file name cache to find a name for the vnode, but this is more expensive.

The **VOP\_INOTIFY\_ADD\_WATCH**() operation is for internal use by the inotify subsystem to add a watch to a vnode.

## LOCKS

The **VOP\_INOTIFY**() operation does not assume any particular vnode lock state. The **VOP\_INOTIFY\_ADD\_WATCH**() operation should be called with the vnode locked.

## RETURN VALUES

Zero is returned on success, otherwise an error code is returned.

## SEE ALSO

[inotify(2)](/inotify/2.md), [vnode(9)](/vnode/9.md)
