summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2021-12-11 09:28:27 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2021-12-11 09:28:27 +0000
commitc1809b833fd76a96ac3af269b7e0adffa3ec9ed1 (patch)
tree74d59d5fa50632e1755a67a258df2d3f388baf40 /sys/nfs
parent8e9bdeba24898f46623ffd9191ed9fb8e126065e (diff)
Clarify usage of __EV_POLL and __EV_SELECT
Make __EV_POLL specific to kqueue-based poll(2), to remove overlap with __EV_SELECT that only select(2) uses. OK millert@ mpi@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_kq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/nfs/nfs_kq.c b/sys/nfs/nfs_kq.c
index fcd826a9889..0d9cfe5b0c1 100644
--- a/sys/nfs/nfs_kq.c
+++ b/sys/nfs/nfs_kq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_kq.c,v 1.33 2020/12/25 12:59:53 visa Exp $ */
+/* $OpenBSD: nfs_kq.c,v 1.34 2021/12/11 09:28:26 visa Exp $ */
/* $NetBSD: nfs_kq.c,v 1.7 2003/10/30 01:43:10 simonb Exp $ */
/*-
@@ -189,7 +189,7 @@ filt_nfsdetach(struct knote *kn)
klist_remove_locked(&vp->v_selectinfo.si_note, kn);
/* Remove the vnode from watch list */
- if ((kn->kn_flags & __EV_POLL) == 0)
+ if ((kn->kn_flags & (__EV_POLL | __EV_SELECT)) == 0)
nfs_kqunwatch(vp);
}
@@ -246,7 +246,7 @@ filt_nfsread(struct knote *kn, long hint)
return (1);
}
- if (kn->kn_flags & __EV_POLL)
+ if (kn->kn_flags & (__EV_POLL | __EV_SELECT))
return (1);
return (kn->kn_data != 0);
@@ -335,7 +335,7 @@ nfs_kqfilter(void *v)
/*
* Put the vnode to watched list.
*/
- if ((kn->kn_flags & __EV_POLL) == 0) {
+ if ((kn->kn_flags & (__EV_POLL | __EV_SELECT)) == 0) {
int error;
error = nfs_kqwatch(vp);