summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2020-04-08 08:07:53 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2020-04-08 08:07:53 +0000
commitaa2f29d03f17b672a326e6ea9d3c9dac9c32dc7a (patch)
tree822fc976acc6808484d2cf49ae10170823d1b2b5 /sys/kern/vfs_vnops.c
parent9e8d4e12caf547965622f4e6e0cdf16c6d336fc9 (diff)
Make fifo_kqfilter() honor FREAD|FWRITE just like fifo_poll() does.
Prevent generating events that do not correspond to how the fifo has been opened. ok visa@, millert@
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 54fbebb00d8..fefbebf3cfd 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.113 2020/02/22 11:58:29 anton Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.114 2020/04/08 08:07:51 mpi Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -619,7 +619,7 @@ vn_closefile(struct file *fp, struct proc *p)
int
vn_kqfilter(struct file *fp, struct knote *kn)
{
- return (VOP_KQFILTER(fp->f_data, kn));
+ return (VOP_KQFILTER(fp->f_data, fp->f_flag, kn));
}
int