Don't rely on vp->v_usecount to tell when we can dispose of our resources in fifo_close().  If the FIFO is accessed via a layed fs (e.g. nullfs), v_usecount will always be 1.  Instead, just check fip->if_readers and fip->fi_writers.  If either one is non-zero we know the FIFO is in use and we should not free up its resources.  Adapted from FreeBSD, NetBSD has an equivalent change (but they keep a counter instead).
Don't rely on vp->v_usecount to tell when we can dispose of our resources
in fifo_close().  If the FIFO is accessed via a layed fs (e.g. nullfs),
v_usecount will always be 1.  Instead, just check fip->if_readers and
fip->fi_writers.  If either one is non-zero we know the FIFO is in use
and we should not free up its resources.  Adapted from FreeBSD, NetBSD
has an equivalent change (but they keep a counter instead).

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars