Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

kernel - kevent refactor - Tear out devfs knote assumption

* devfs could assume orphaned knotes if a device was detached, the method
  in which this is handled has now changed.
  • Loading branch information...
commit a3d8104c57f12ad13f18a3c19c2ab1eddacd7720 1 parent 611638d
@thesjg authored
Showing with 0 additions and 43 deletions.
  1. +0 −43 sys/vfs/devfs/devfs_core.c
View
43 sys/vfs/devfs/devfs_core.c
@@ -2302,49 +2302,6 @@ devfs_cdev_unlock(cdev_t dev)
{
}
-static int
-devfs_detached_filter_eof(struct knote *kn, long hint)
-{
- kn->kn_flags |= EV_EOF;
- return (1);
-}
-
-static void
-devfs_detached_filter_detach(struct knote *kn)
-{
- cdev_t dev = (cdev_t)kn->kn_hook;
-
- knote_remove(&dev->si_kqinfo.ki_note, kn);
-}
-
-static struct filterops devfs_detached_filterops =
- { FILTEROP_ISFD, NULL,
- devfs_detached_filter_detach,
- devfs_detached_filter_eof };
-
-/*
- * Delegates knote filter handling responsibility to devfs
- *
- * Any device that implements kqfilter event handling and could be detached
- * or shut down out from under the kevent subsystem must allow devfs to
- * assume responsibility for any knotes it may hold.
- */
-void
-devfs_assume_knotes(cdev_t dev, struct kqinfo *kqi)
-{
- /*
- * Let kern/kern_event.c do the heavy lifting.
- */
- knote_assume_knotes(kqi, &dev->si_kqinfo,
- &devfs_detached_filterops, (void *)dev);
-
- /*
- * These should probably be activated individually, but doing so
- * would require refactoring kq's public in-kernel interface.
- */
- KNOTE(&dev->si_kqinfo.ki_note, 0);
-}
-
/*
* Links a given cdev into the dev list.
*/
Please sign in to comment.
Something went wrong with that request. Please try again.