HomeFreeBSD

nullfs: Clear inotify flags during reclaim

Description

nullfs: Clear inotify flags during reclaim

The inotify flags are copied from the lower vnode into the nullfs vnode
so that the INOTIFY() macro will invoke VOP_INOTIFY on the nullfs vnode;
this is then bypassed to the lower vnode. However, when a nullfs vnode
is reclaimed we should clear these flags, as the vnode is now doomed and
no longer forwards VOPs to the lower vnode.

Add regression tests. Remove a test in vn_inotify_revoke() which is no
longer needed after this change.

Approved by: re (cperciva)
PR: 292495
Reviewed by: kib
Reported by: Jed Laundry <jlaundry@jlaundry.com>
Fixes: f1f230439fa4 ("vfs: Initial revision of inotify")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56639

(cherry picked from commit a02d794f5acd12ba3cf1de5c204a8dd56af47edd)
(cherry picked from commit 10567c80b6845717306c5301d104e7440033c4f5)

Details

Provenance
markjAuthored on Apr 26 2026, 1:35 AM
cpercivaCommitted on May 7 2026, 8:40 PM
Reviewer
rGf1f230439fa4: vfs: Initial revision of inotify
Differential Revision
D56639: nullfs: Clear inotify flags during reclaim
Parents
rGa096a97448cf: so_splice: Fix the KTLS check for the sink socket in so_splice()
Branches
Unknown
Tags
Unknown