filt_fsevent: only record interested events

Respect filter-specific flags for the EVFILT_FS filter.

When a kevent is registered with the EVFILT_FS filter, it is always
triggered when an EVFILT_FS event occurs, regardless of the
filter-specific flags used. Fix that.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D28974
This commit is contained in:
Robert Wing 2021-03-02 14:19:22 -09:00
parent ce22a792de
commit 0cc746f193

View File

@ -6016,7 +6016,8 @@ static int
filt_fsevent(struct knote *kn, long hint) filt_fsevent(struct knote *kn, long hint)
{ {
kn->kn_fflags |= hint; kn->kn_fflags |= kn->kn_sfflags & hint;
return (kn->kn_fflags != 0); return (kn->kn_fflags != 0);
} }