HomeFreeBSD

inotify: Avoid resetting the cookie

Description

inotify: Avoid resetting the cookie

The IN_MOVED_FROM and _TO events only apply to names in a watched
directory, never to a watched directory itself. So, the cookie value
there is always zero, and in particular we should not reset the
caller-provided cookie value, as it may be used later.

Add a regression test.

Reported by: arrowd
MFC after: 1 week

Details

Provenance
markjAuthored on Dec 21 2025, 11:49 PM
Parents
rG15178d8ed290: pf: Fix state handling when ICMP packets are diverted
Branches
Unknown
Tags
Unknown