Eventually, it will become necessary to add new properties to
struct filterops. One such property is whether the filter is safe to use
without the kernel lock.

The diff below replaces the f_isfd field with a generic flags field in
struct filterops, to allow adding new properties without cluttering
the struct.

OK?

Index: arch/arm64/dev/apm.c
===================================================================
RCS file: src/sys/arch/arm64/dev/apm.c,v
retrieving revision 1.2
diff -u -p -r1.2 apm.c
--- arch/arm64/dev/apm.c        31 Dec 2019 13:48:31 -0000      1.2
+++ arch/arm64/dev/apm.c        19 Feb 2020 15:08:23 -0000
@@ -88,7 +88,7 @@ int apmkqfilter(dev_t dev, struct knote 
 int apm_getdefaultinfo(struct apm_power_info *);
 
 const struct filterops apmread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_apmrdetach,
        .f_event        = filt_apmread,
Index: arch/i386/i386/apm.c
===================================================================
RCS file: src/sys/arch/i386/i386/apm.c,v
retrieving revision 1.121
diff -u -p -r1.121 apm.c
--- arch/i386/i386/apm.c        31 Dec 2019 13:48:31 -0000      1.121
+++ arch/i386/i386/apm.c        19 Feb 2020 15:08:23 -0000
@@ -104,7 +104,7 @@ void        filt_apmrdetach(struct knote *kn);
 int    filt_apmread(struct knote *kn, long hint);
 
 const struct filterops apmread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_apmrdetach,
        .f_event        = filt_apmread,
Index: arch/loongson/dev/apm.c
===================================================================
RCS file: src/sys/arch/loongson/dev/apm.c,v
retrieving revision 1.34
diff -u -p -r1.34 apm.c
--- arch/loongson/dev/apm.c     16 Feb 2020 23:37:23 -0000      1.34
+++ arch/loongson/dev/apm.c     19 Feb 2020 15:08:23 -0000
@@ -94,7 +94,7 @@ int apm_getdefaultinfo(struct apm_power_
 int apm_suspend(int state);
 
 const struct filterops apmread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_apmrdetach,
        .f_event        = filt_apmread,
Index: arch/macppc/dev/apm.c
===================================================================
RCS file: src/sys/arch/macppc/dev/apm.c,v
retrieving revision 1.20
diff -u -p -r1.20 apm.c
--- arch/macppc/dev/apm.c       31 Dec 2019 13:48:31 -0000      1.20
+++ arch/macppc/dev/apm.c       19 Feb 2020 15:08:23 -0000
@@ -86,7 +86,7 @@ int filt_apmread(struct knote *kn, long 
 int apmkqfilter(dev_t dev, struct knote *kn);
 
 const struct filterops apmread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_apmrdetach,
        .f_event        = filt_apmread,
Index: dev/hotplug.c
===================================================================
RCS file: src/sys/dev/hotplug.c,v
retrieving revision 1.18
diff -u -p -r1.18 hotplug.c
--- dev/hotplug.c       31 Dec 2019 13:48:31 -0000      1.18
+++ dev/hotplug.c       19 Feb 2020 15:08:23 -0000
@@ -39,7 +39,7 @@ void filt_hotplugrdetach(struct knote *)
 int  filt_hotplugread(struct knote *, long);
 
 const struct filterops hotplugread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_hotplugrdetach,
        .f_event        = filt_hotplugread,
Index: dev/midi.c
===================================================================
RCS file: src/sys/dev/midi.c,v
retrieving revision 1.45
diff -u -p -r1.45 midi.c
--- dev/midi.c  31 Dec 2019 13:48:31 -0000      1.45
+++ dev/midi.c  19 Feb 2020 15:08:23 -0000
@@ -67,7 +67,7 @@ void filt_midiwdetach(struct knote *);
 int filt_midiwrite(struct knote *, long);
 
 const struct filterops midiwrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_midiwdetach,
        .f_event        = filt_midiwrite,
@@ -77,7 +77,7 @@ void filt_midirdetach(struct knote *);
 int filt_midiread(struct knote *, long);
 
 const struct filterops midiread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_midirdetach,
        .f_event        = filt_midiread,
Index: dev/rnd.c
===================================================================
RCS file: src/sys/dev/rnd.c,v
retrieving revision 1.200
diff -u -p -r1.200 rnd.c
--- dev/rnd.c   31 Dec 2019 13:48:31 -0000      1.200
+++ dev/rnd.c   19 Feb 2020 15:08:23 -0000
@@ -242,14 +242,14 @@ static void _rs_seed(u_char *, size_t);
 static void _rs_clearseed(const void *p, size_t s);
 
 const struct filterops randomread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_randomdetach,
        .f_event        = filt_randomread,
 };
 
 const struct filterops randomwrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_randomdetach,
        .f_event        = filt_randomwrite,
Index: dev/vscsi.c
===================================================================
RCS file: src/sys/dev/vscsi.c,v
retrieving revision 1.47
diff -u -p -r1.47 vscsi.c
--- dev/vscsi.c 5 Feb 2020 16:29:29 -0000       1.47
+++ dev/vscsi.c 19 Feb 2020 15:08:23 -0000
@@ -114,7 +114,7 @@ void                filt_vscsidetach(struct knote *);
 int            filt_vscsiread(struct knote *, long);
   
 const struct filterops vscsi_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_vscsidetach,
        .f_event        = filt_vscsiread,
Index: dev/acpi/acpi.c
===================================================================
RCS file: src/sys/dev/acpi/acpi.c,v
retrieving revision 1.377
diff -u -p -r1.377 acpi.c
--- dev/acpi/acpi.c     31 Dec 2019 13:48:31 -0000      1.377
+++ dev/acpi/acpi.c     19 Feb 2020 15:08:23 -0000
@@ -3450,7 +3450,7 @@ void      acpi_filtdetach(struct knote *);
 int    acpi_filtread(struct knote *, long);
 
 const struct filterops acpiread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = acpi_filtdetach,
        .f_event        = acpi_filtread,
Index: dev/pci/drm/drm_drv.c
===================================================================
RCS file: src/sys/dev/pci/drm/drm_drv.c,v
retrieving revision 1.170
diff -u -p -r1.170 drm_drv.c
--- dev/pci/drm/drm_drv.c       5 Jan 2020 08:39:46 -0000       1.170
+++ dev/pci/drm/drm_drv.c       19 Feb 2020 15:08:23 -0000
@@ -496,7 +496,7 @@ filt_drmkms(struct knote *kn, long hint)
 }
 
 const struct filterops drm_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_drmdetach,
        .f_event        = filt_drmkms,
Index: dev/usb/ugen.c
===================================================================
RCS file: src/sys/dev/usb/ugen.c,v
retrieving revision 1.101
diff -u -p -r1.101 ugen.c
--- dev/usb/ugen.c      4 Jan 2020 11:37:33 -0000       1.101
+++ dev/usb/ugen.c      19 Feb 2020 15:08:24 -0000
@@ -1329,21 +1329,21 @@ filt_ugenread_isoc(struct knote *kn, lon
 }
 
 const struct filterops ugenread_intr_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ugenrdetach,
        .f_event        = filt_ugenread_intr,
 };
 
 const struct filterops ugenread_isoc_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ugenrdetach,
        .f_event        = filt_ugenread_isoc,
 };
 
 const struct filterops ugen_seltrue_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ugenrdetach,
        .f_event        = filt_seltrue,
Index: dev/usb/uhid.c
===================================================================
RCS file: src/sys/dev/usb/uhid.c,v
retrieving revision 1.76
diff -u -p -r1.76 uhid.c
--- dev/usb/uhid.c      18 Jan 2020 09:00:52 -0000      1.76
+++ dev/usb/uhid.c      19 Feb 2020 15:08:24 -0000
@@ -461,14 +461,14 @@ filt_uhidread(struct knote *kn, long hin
 }
 
 const struct filterops uhidread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_uhidrdetach,
        .f_event        = filt_uhidread,
 };
 
 const struct filterops uhid_seltrue_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_uhidrdetach,
        .f_event        = filt_seltrue,
Index: dev/wscons/wsevent.c
===================================================================
RCS file: src/sys/dev/wscons/wsevent.c,v
retrieving revision 1.22
diff -u -p -r1.22 wsevent.c
--- dev/wscons/wsevent.c        31 Dec 2019 13:48:31 -0000      1.22
+++ dev/wscons/wsevent.c        19 Feb 2020 15:08:24 -0000
@@ -89,7 +89,7 @@ void  filt_wseventdetach(struct knote *);
 int    filt_wseventread(struct knote *, long);
 
 const struct filterops wsevent_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_wseventdetach,
        .f_event        = filt_wseventread,
Index: isofs/cd9660/cd9660_vnops.c
===================================================================
RCS file: src/sys/isofs/cd9660/cd9660_vnops.c,v
retrieving revision 1.81
diff -u -p -r1.81 cd9660_vnops.c
--- isofs/cd9660/cd9660_vnops.c 20 Jan 2020 23:21:55 -0000      1.81
+++ isofs/cd9660/cd9660_vnops.c 19 Feb 2020 15:08:24 -0000
@@ -959,21 +959,21 @@ int filt_cd9660write(struct knote *kn, l
 int filt_cd9660vnode(struct knote *kn, long hint);
 
 const struct filterops cd9660read_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_cd9660detach,
        .f_event        = filt_cd9660read,
 };
 
 const struct filterops cd9660write_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_cd9660detach,
        .f_event        = filt_cd9660write,
 };
 
 const struct filterops cd9660vnode_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_cd9660detach,
        .f_event        = filt_cd9660vnode,
Index: kern/kern_event.c
===================================================================
RCS file: src/sys/kern/kern_event.c,v
retrieving revision 1.125
diff -u -p -r1.125 kern_event.c
--- kern/kern_event.c   17 Feb 2020 04:07:01 -0000      1.125
+++ kern/kern_event.c   19 Feb 2020 15:08:24 -0000
@@ -104,28 +104,28 @@ int       filt_timer(struct knote *kn, long hi
 void   filt_seltruedetach(struct knote *kn);
 
 const struct filterops kqread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_kqdetach,
        .f_event        = filt_kqueue,
 };
 
 const struct filterops proc_filtops = {
-       .f_isfd         = 0,
+       .f_flags        = 0,
        .f_attach       = filt_procattach,
        .f_detach       = filt_procdetach,
        .f_event        = filt_proc,
 };
 
 const struct filterops file_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = filt_fileattach,
        .f_detach       = NULL,
        .f_event        = NULL,
 };
 
 const struct filterops timer_filtops = {
-       .f_isfd         = 0,
+       .f_flags        = 0,
        .f_attach       = filt_timerattach,
        .f_detach       = filt_timerdetach,
        .f_event        = filt_timer,
@@ -447,7 +447,7 @@ filt_seltruedetach(struct knote *kn)
 }
 
 const struct filterops seltrue_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_seltruedetach,
        .f_event        = filt_seltrue,
@@ -484,7 +484,7 @@ filt_deaddetach(struct knote *kn)
 }
 
 static const struct filterops dead_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_deaddetach,
        .f_event        = filt_dead,
@@ -684,7 +684,7 @@ kqueue_register(struct kqueue *kq, struc
                return (EINVAL);
        }
 
-       if (fops->f_isfd) {
+       if (fops->f_flags & FILTEROP_ISFD) {
                /* validate descriptor */
                if (kev->ident > INT_MAX)
                        return (EBADF);
@@ -694,7 +694,7 @@ kqueue_register(struct kqueue *kq, struc
                newkn = pool_get(&knote_pool, PR_WAITOK | PR_ZERO);
 
 again:
-       if (fops->f_isfd) {
+       if (fops->f_flags & FILTEROP_ISFD) {
                if ((fp = fd_getfile(fdp, kev->ident)) == NULL) {
                        error = EBADF;
                        goto done;
@@ -774,7 +774,7 @@ again:
                         * knote_fdclose() has missed kn if the function
                         * ran before kn appeared in kq_knlist.
                         */
-                       if (fops->f_isfd &&
+                       if ((fops->f_flags & FILTEROP_ISFD) &&
                            fd_checkclosed(fdp, kev->ident, kn->kn_fp)) {
                                /*
                                 * Drop the knote silently without error
@@ -1297,7 +1297,7 @@ knote_attach(struct knote *kn)
        struct kqueue *kq = kn->kn_kq;
        struct klist *list;
 
-       if (kn->kn_fop->f_isfd) {
+       if (kn->kn_fop->f_flags & FILTEROP_ISFD) {
                KASSERT(kq->kq_knlistsize > kn->kn_id);
                list = &kq->kq_knlist[kn->kn_id];
        } else {
@@ -1320,7 +1320,7 @@ knote_drop(struct knote *kn, struct proc
 
        KASSERT(kn->kn_filter != EVFILT_MARKER);
 
-       if (kn->kn_fop->f_isfd)
+       if (kn->kn_fop->f_flags & FILTEROP_ISFD)
                list = &kq->kq_knlist[kn->kn_id];
        else
                list = &kq->kq_knhash[KN_HASH(kn->kn_id, kq->kq_knhashmask)];
@@ -1334,7 +1334,7 @@ knote_drop(struct knote *kn, struct proc
                wakeup(kn);
        }
        splx(s);
-       if (kn->kn_fop->f_isfd)
+       if (kn->kn_fop->f_flags & FILTEROP_ISFD)
                FRELE(kn->kn_fp, p);
        pool_put(&knote_pool, kn);
 }
Index: kern/kern_sig.c
===================================================================
RCS file: src/sys/kern/kern_sig.c,v
retrieving revision 1.248
diff -u -p -r1.248 kern_sig.c
--- kern/kern_sig.c     19 Feb 2020 11:33:48 -0000      1.248
+++ kern/kern_sig.c     19 Feb 2020 15:08:24 -0000
@@ -77,7 +77,7 @@ void  filt_sigdetach(struct knote *kn);
 int    filt_signal(struct knote *kn, long hint);
 
 const struct filterops sig_filtops = {
-       .f_isfd         = 0,
+       .f_flags        = 0,
        .f_attach       = filt_sigattach,
        .f_detach       = filt_sigdetach,
        .f_event        = filt_signal,
Index: kern/subr_log.c
===================================================================
RCS file: src/sys/kern/subr_log.c,v
retrieving revision 1.64
diff -u -p -r1.64 subr_log.c
--- kern/subr_log.c     11 Jan 2020 14:30:24 -0000      1.64
+++ kern/subr_log.c     19 Feb 2020 15:08:24 -0000
@@ -87,7 +87,7 @@ void filt_logrdetach(struct knote *kn);
 int filt_logread(struct knote *kn, long hint);
 
 const struct filterops logread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_logrdetach,
        .f_event        = filt_logread,
Index: kern/sys_pipe.c
===================================================================
RCS file: src/sys/kern/sys_pipe.c,v
retrieving revision 1.117
diff -u -p -r1.117 sys_pipe.c
--- kern/sys_pipe.c     16 Feb 2020 07:59:08 -0000      1.117
+++ kern/sys_pipe.c     19 Feb 2020 15:08:24 -0000
@@ -75,14 +75,14 @@ int filt_piperead(struct knote *kn, long
 int    filt_pipewrite(struct knote *kn, long hint);
 
 const struct filterops pipe_rfiltops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_pipedetach,
        .f_event        = filt_piperead,
 };
 
 const struct filterops pipe_wfiltops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_pipedetach,
        .f_event        = filt_pipewrite,
Index: kern/tty.c
===================================================================
RCS file: src/sys/kern/tty.c,v
retrieving revision 1.152
diff -u -p -r1.152 tty.c
--- kern/tty.c  8 Feb 2020 14:52:07 -0000       1.152
+++ kern/tty.c  19 Feb 2020 15:08:24 -0000
@@ -1090,14 +1090,14 @@ ttpoll(dev_t device, int events, struct 
 }
 
 const struct filterops ttyread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ttyrdetach,
        .f_event        = filt_ttyread,
 };
 
 const struct filterops ttywrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ttywdetach,
        .f_event        = filt_ttywrite,
Index: kern/tty_pty.c
===================================================================
RCS file: src/sys/kern/tty_pty.c,v
retrieving revision 1.96
diff -u -p -r1.96 tty_pty.c
--- kern/tty_pty.c      11 Jan 2020 14:30:24 -0000      1.96
+++ kern/tty_pty.c      19 Feb 2020 15:08:24 -0000
@@ -717,14 +717,14 @@ filt_ptcwrite(struct knote *kn, long hin
 }
 
 const struct filterops ptcread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ptcrdetach,
        .f_event        = filt_ptcread,
 };
 
 const struct filterops ptcwrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ptcwdetach,
        .f_event        = filt_ptcwrite,
Index: kern/uipc_socket.c
===================================================================
RCS file: src/sys/kern/uipc_socket.c,v
retrieving revision 1.240
diff -u -p -r1.240 uipc_socket.c
--- kern/uipc_socket.c  14 Feb 2020 14:32:44 -0000      1.240
+++ kern/uipc_socket.c  19 Feb 2020 15:08:24 -0000
@@ -73,21 +73,21 @@ int filt_sowrite(struct knote *kn, long 
 int    filt_solisten(struct knote *kn, long hint);
 
 const struct filterops solisten_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_sordetach,
        .f_event        = filt_solisten,
 };
 
 const struct filterops soread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_sordetach,
        .f_event        = filt_soread,
 };
 
 const struct filterops sowrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_sowdetach,
        .f_event        = filt_sowrite,
Index: kern/vfs_default.c
===================================================================
RCS file: src/sys/kern/vfs_default.c,v
retrieving revision 1.46
diff -u -p -r1.46 vfs_default.c
--- kern/vfs_default.c  31 Dec 2019 13:48:32 -0000      1.46
+++ kern/vfs_default.c  19 Feb 2020 15:08:24 -0000
@@ -186,7 +186,7 @@ vop_generic_islocked(void *v)
 }
 
 const struct filterops generic_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_generic_detach,
        .f_event        = filt_generic_readwrite,
Index: miscfs/fifofs/fifo_vnops.c
===================================================================
RCS file: src/sys/miscfs/fifofs/fifo_vnops.c,v
retrieving revision 1.72
diff -u -p -r1.72 fifo_vnops.c
--- miscfs/fifofs/fifo_vnops.c  20 Jan 2020 23:21:56 -0000      1.72
+++ miscfs/fifofs/fifo_vnops.c  19 Feb 2020 15:08:24 -0000
@@ -108,14 +108,14 @@ void      filt_fifowdetach(struct knote *kn);
 int    filt_fifowrite(struct knote *kn, long hint);
 
 const struct filterops fiforead_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_fifordetach,
        .f_event        = filt_fiforead,
 };
 
 const struct filterops fifowrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_fifowdetach,
        .f_event        = filt_fifowrite,
Index: miscfs/fuse/fuse_device.c
===================================================================
RCS file: src/sys/miscfs/fuse/fuse_device.c,v
retrieving revision 1.30
diff -u -p -r1.30 fuse_device.c
--- miscfs/fuse/fuse_device.c   31 Dec 2019 13:48:32 -0000      1.30
+++ miscfs/fuse/fuse_device.c   19 Feb 2020 15:08:24 -0000
@@ -70,14 +70,14 @@ int filt_fuse_read(struct knote *, long)
 void   filt_fuse_rdetach(struct knote *);
 
 const static struct filterops fuse_rd_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_fuse_rdetach,
        .f_event        = filt_fuse_read,
 };
 
 const static struct filterops fuse_seltrue_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_fuse_rdetach,
        .f_event        = filt_seltrue,
Index: miscfs/fuse/fuse_vnops.c
===================================================================
RCS file: src/sys/miscfs/fuse/fuse_vnops.c,v
retrieving revision 1.57
diff -u -p -r1.57 fuse_vnops.c
--- miscfs/fuse/fuse_vnops.c    20 Jan 2020 23:21:56 -0000      1.57
+++ miscfs/fuse/fuse_vnops.c    19 Feb 2020 15:08:24 -0000
@@ -111,21 +111,21 @@ const struct vops fusefs_vops = {
 };
 
 const struct filterops fusefsread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_fusefsdetach,
        .f_event        = filt_fusefsread,
 };
 
 const struct filterops fusefswrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_fusefsdetach,
        .f_event        = filt_fusefswrite,
 };
 
 const struct filterops fusefsvnode_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_fusefsdetach,
        .f_event        = filt_fusefsvnode,
Index: msdosfs/msdosfs_vnops.c
===================================================================
RCS file: src/sys/msdosfs/msdosfs_vnops.c,v
retrieving revision 1.128
diff -u -p -r1.128 msdosfs_vnops.c
--- msdosfs/msdosfs_vnops.c     20 Jan 2020 23:21:56 -0000      1.128
+++ msdosfs/msdosfs_vnops.c     19 Feb 2020 15:08:24 -0000
@@ -1960,21 +1960,21 @@ const struct vops msdosfs_vops = {
 };
 
 const struct filterops msdosfsread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_msdosfsdetach,
        .f_event        = filt_msdosfsread,
 };
 
 const struct filterops msdosfswrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_msdosfsdetach,
        .f_event        = filt_msdosfswrite,
 };
 
 const struct filterops msdosfsvnode_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_msdosfsdetach,
        .f_event        = filt_msdosfsvnode,
Index: net/bpf.c
===================================================================
RCS file: src/sys/net/bpf.c,v
retrieving revision 1.187
diff -u -p -r1.187 bpf.c
--- net/bpf.c   14 Feb 2020 14:32:44 -0000      1.187
+++ net/bpf.c   19 Feb 2020 15:08:24 -0000
@@ -1163,7 +1163,7 @@ bpfpoll(dev_t dev, int events, struct pr
 }
 
 const struct filterops bpfread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_bpfrdetach,
        .f_event        = filt_bpfread,
Index: net/if_pppx.c
===================================================================
RCS file: src/sys/net/if_pppx.c,v
retrieving revision 1.75
diff -u -p -r1.75 if_pppx.c
--- net/if_pppx.c       18 Feb 2020 15:06:27 -0000      1.75
+++ net/if_pppx.c       19 Feb 2020 15:08:24 -0000
@@ -191,7 +191,7 @@ void                filt_pppx_rdetach(struct knote *);
 int            filt_pppx_read(struct knote *, long);
 
 const struct filterops pppx_rd_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_pppx_rdetach,
        .f_event        = filt_pppx_read,
@@ -201,7 +201,7 @@ void                filt_pppx_wdetach(struct knote *);
 int            filt_pppx_write(struct knote *, long);
 
 const struct filterops pppx_wr_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_pppx_wdetach,
        .f_event        = filt_pppx_write,
Index: net/if_tun.c
===================================================================
RCS file: src/sys/net/if_tun.c,v
retrieving revision 1.218
diff -u -p -r1.218 if_tun.c
--- net/if_tun.c        14 Feb 2020 14:32:44 -0000      1.218
+++ net/if_tun.c        19 Feb 2020 15:08:24 -0000
@@ -133,14 +133,14 @@ void      filt_tunwdetach(struct knote *);
 void   tun_link_state(struct tun_softc *, int);
 
 const struct filterops tunread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_tunrdetach,
        .f_event        = filt_tunread,
 };
 
 const struct filterops tunwrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_tunwdetach,
        .f_event        = filt_tunwrite,
Index: net/switchctl.c
===================================================================
RCS file: src/sys/net/switchctl.c,v
retrieving revision 1.19
diff -u -p -r1.19 switchctl.c
--- net/switchctl.c     28 Jan 2020 16:26:09 -0000      1.19
+++ net/switchctl.c     19 Feb 2020 15:08:24 -0000
@@ -60,14 +60,14 @@ int switch_dev_output(struct switch_soft
 void   switch_dev_wakeup(struct switch_softc *);
 
 const struct filterops switch_rd_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_switch_rdetach,
        .f_event        = filt_switch_read,
 };
 
 const struct filterops switch_wr_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_switch_wdetach,
        .f_event        = filt_switch_write,
Index: nfs/nfs_kq.c
===================================================================
RCS file: src/sys/nfs/nfs_kq.c,v
retrieving revision 1.28
diff -u -p -r1.28 nfs_kq.c
--- nfs/nfs_kq.c        21 Jan 2020 00:18:13 -0000      1.28
+++ nfs/nfs_kq.c        19 Feb 2020 15:08:24 -0000
@@ -250,14 +250,14 @@ filt_nfsvnode(struct knote *kn, long hin
 }
 
 static const struct filterops nfsread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_nfsdetach,
        .f_event        = filt_nfsread,
 };
 
 static const struct filterops nfsvnode_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_nfsdetach,
        .f_event        = filt_nfsvnode,
Index: sys/event.h
===================================================================
RCS file: src/sys/sys/event.h,v
retrieving revision 1.32
diff -u -p -r1.32 event.h
--- sys/event.h 31 Dec 2019 13:48:32 -0000      1.32
+++ sys/event.h 19 Feb 2020 15:08:24 -0000
@@ -146,8 +146,10 @@ SLIST_HEAD(klist, knote);
  */
 #define NOTE_SIGNAL    0x08000000
 
+#define FILTEROP_ISFD          0x00000001      /* ident == filedescriptor */
+
 struct filterops {
-       int     f_isfd;         /* true if ident == filedescriptor */
+       int     f_flags;
        int     (*f_attach)(struct knote *kn);
        void    (*f_detach)(struct knote *kn);
        int     (*f_event)(struct knote *kn, long hint);
Index: tmpfs/tmpfs_vnops.c
===================================================================
RCS file: src/sys/tmpfs/tmpfs_vnops.c,v
retrieving revision 1.38
diff -u -p -r1.38 tmpfs_vnops.c
--- tmpfs/tmpfs_vnops.c 20 Jan 2020 23:21:56 -0000      1.38
+++ tmpfs/tmpfs_vnops.c 19 Feb 2020 15:08:24 -0000
@@ -2588,21 +2588,21 @@ int filt_tmpfswrite(struct knote *kn, lo
 int filt_tmpfsvnode(struct knote *kn, long hint);
 
 const struct filterops tmpfsread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_tmpfsdetach,
        .f_event        = filt_tmpfsread,
 };
 
 const struct filterops tmpfswrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_tmpfsdetach,
        .f_event        = filt_tmpfswrite,
 };
 
 const struct filterops tmpfsvnode_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_tmpfsdetach,
        .f_event        = filt_tmpfsvnode,
Index: ufs/ufs/ufs_vnops.c
===================================================================
RCS file: src/sys/ufs/ufs/ufs_vnops.c,v
retrieving revision 1.147
diff -u -p -r1.147 ufs_vnops.c
--- ufs/ufs/ufs_vnops.c 31 Dec 2019 13:48:32 -0000      1.147
+++ ufs/ufs/ufs_vnops.c 19 Feb 2020 15:08:24 -0000
@@ -1893,21 +1893,21 @@ bad:
 }
 
 const struct filterops ufsread_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ufsdetach,
        .f_event        = filt_ufsread,
 };
 
 const struct filterops ufswrite_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ufsdetach,
        .f_event        = filt_ufswrite,
 };
 
 const struct filterops ufsvnode_filtops = {
-       .f_isfd         = 1,
+       .f_flags        = FILTEROP_ISFD,
        .f_attach       = NULL,
        .f_detach       = filt_ufsdetach,
        .f_event        = filt_ufsvnode,

Reply via email to