Remove the remnants of SI_CHEAPCLONE
SI_CHEAPCLONE was introduced in r66067 for use with cloned bpfs. It was later also used in tty, tun, tap at points. The rough timeline for being removed in each of these is as follows: - r181690: bpf switched to use cdevpriv API by ed@ - r181905: ed@ rewrote the TTY later to be mpsafe - r204464: kib@ removes it from tun/tap, declaring it unused I've not yet been able to dig up any other consumers in the intervening 9 years. It is no longer set on any devices in the tree and leaves an interesting situation in make_dev_sv where we're ok with the device already being set SI_NAMED.
This commit is contained in:
parent
2f4d113ad6
commit
d0d0375375
@ -166,12 +166,6 @@ dev_rel(struct cdev *dev)
|
||||
dev->si_refcount--;
|
||||
KASSERT(dev->si_refcount >= 0,
|
||||
("dev_rel(%s) gave negative count", devtoname(dev)));
|
||||
#if 0
|
||||
if (dev->si_usecount == 0 &&
|
||||
(dev->si_flags & SI_CHEAPCLONE) && (dev->si_flags & SI_NAMED))
|
||||
;
|
||||
else
|
||||
#endif
|
||||
if (dev->si_devsw == NULL && dev->si_refcount == 0) {
|
||||
LIST_REMOVE(dev, si_list);
|
||||
flag = 1;
|
||||
@ -820,17 +814,6 @@ make_dev_sv(struct make_dev_args *args1, struct cdev **dres,
|
||||
dev_refl(dev);
|
||||
if ((args.mda_flags & MAKEDEV_ETERNAL) != 0)
|
||||
dev->si_flags |= SI_ETERNAL;
|
||||
if (dev->si_flags & SI_CHEAPCLONE &&
|
||||
dev->si_flags & SI_NAMED) {
|
||||
/*
|
||||
* This is allowed as it removes races and generally
|
||||
* simplifies cloning devices.
|
||||
* XXX: still ??
|
||||
*/
|
||||
dev_unlock_and_free();
|
||||
*dres = dev;
|
||||
return (0);
|
||||
}
|
||||
KASSERT(!(dev->si_flags & SI_NAMED),
|
||||
("make_dev() by driver %s on pre-existing device (min=%x, name=%s)",
|
||||
args.mda_devsw->d_name, dev2unit(dev), devtoname(dev)));
|
||||
@ -1565,7 +1548,6 @@ DB_SHOW_COMMAND(cdev, db_show_cdev)
|
||||
SI_FLAG(SI_ETERNAL);
|
||||
SI_FLAG(SI_ALIAS);
|
||||
SI_FLAG(SI_NAMED);
|
||||
SI_FLAG(SI_CHEAPCLONE);
|
||||
SI_FLAG(SI_CHILD);
|
||||
SI_FLAG(SI_DUMPDEV);
|
||||
SI_FLAG(SI_CLONELIST);
|
||||
|
@ -59,7 +59,7 @@ struct cdev {
|
||||
#define SI_ETERNAL 0x0001 /* never destroyed */
|
||||
#define SI_ALIAS 0x0002 /* carrier of alias name */
|
||||
#define SI_NAMED 0x0004 /* make_dev{_alias} has been called */
|
||||
#define SI_CHEAPCLONE 0x0008 /* can be removed_dev'ed when vnode reclaims */
|
||||
#define SI_UNUSED1 0x0008 /* unused */
|
||||
#define SI_CHILD 0x0010 /* child of another struct cdev **/
|
||||
#define SI_DUMPDEV 0x0080 /* is kernel dumpdev */
|
||||
#define SI_CLONELIST 0x0200 /* on a clone list */
|
||||
|
Loading…
Reference in New Issue
Block a user